proteus  1.7.2
C/C++/Fortran libraries
ADR.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.2 */
2 
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6  #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
8  #error Cython requires Python 2.6+ or Python 3.3+.
9 #else
10 #define CYTHON_ABI "0_29_2"
11 #define CYTHON_HEX_VERSION 0x001D02F0
12 #define CYTHON_FUTURE_DIVISION 0
13 #include <stddef.h>
14 #ifndef offsetof
15  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
16 #endif
17 #if !defined(WIN32) && !defined(MS_WINDOWS)
18  #ifndef __stdcall
19  #define __stdcall
20  #endif
21  #ifndef __cdecl
22  #define __cdecl
23  #endif
24  #ifndef __fastcall
25  #define __fastcall
26  #endif
27 #endif
28 #ifndef DL_IMPORT
29  #define DL_IMPORT(t) t
30 #endif
31 #ifndef DL_EXPORT
32  #define DL_EXPORT(t) t
33 #endif
34 #define __PYX_COMMA ,
35 #ifndef HAVE_LONG_LONG
36  #if PY_VERSION_HEX >= 0x02070000
37  #define HAVE_LONG_LONG
38  #endif
39 #endif
40 #ifndef PY_LONG_LONG
41  #define PY_LONG_LONG LONG_LONG
42 #endif
43 #ifndef Py_HUGE_VAL
44  #define Py_HUGE_VAL HUGE_VAL
45 #endif
46 #ifdef PYPY_VERSION
47  #define CYTHON_COMPILING_IN_PYPY 1
48  #define CYTHON_COMPILING_IN_PYSTON 0
49  #define CYTHON_COMPILING_IN_CPYTHON 0
50  #undef CYTHON_USE_TYPE_SLOTS
51  #define CYTHON_USE_TYPE_SLOTS 0
52  #undef CYTHON_USE_PYTYPE_LOOKUP
53  #define CYTHON_USE_PYTYPE_LOOKUP 0
54  #if PY_VERSION_HEX < 0x03050000
55  #undef CYTHON_USE_ASYNC_SLOTS
56  #define CYTHON_USE_ASYNC_SLOTS 0
57  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
58  #define CYTHON_USE_ASYNC_SLOTS 1
59  #endif
60  #undef CYTHON_USE_PYLIST_INTERNALS
61  #define CYTHON_USE_PYLIST_INTERNALS 0
62  #undef CYTHON_USE_UNICODE_INTERNALS
63  #define CYTHON_USE_UNICODE_INTERNALS 0
64  #undef CYTHON_USE_UNICODE_WRITER
65  #define CYTHON_USE_UNICODE_WRITER 0
66  #undef CYTHON_USE_PYLONG_INTERNALS
67  #define CYTHON_USE_PYLONG_INTERNALS 0
68  #undef CYTHON_AVOID_BORROWED_REFS
69  #define CYTHON_AVOID_BORROWED_REFS 1
70  #undef CYTHON_ASSUME_SAFE_MACROS
71  #define CYTHON_ASSUME_SAFE_MACROS 0
72  #undef CYTHON_UNPACK_METHODS
73  #define CYTHON_UNPACK_METHODS 0
74  #undef CYTHON_FAST_THREAD_STATE
75  #define CYTHON_FAST_THREAD_STATE 0
76  #undef CYTHON_FAST_PYCALL
77  #define CYTHON_FAST_PYCALL 0
78  #undef CYTHON_PEP489_MULTI_PHASE_INIT
79  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
80  #undef CYTHON_USE_TP_FINALIZE
81  #define CYTHON_USE_TP_FINALIZE 0
82  #undef CYTHON_USE_DICT_VERSIONS
83  #define CYTHON_USE_DICT_VERSIONS 0
84  #undef CYTHON_USE_EXC_INFO_STACK
85  #define CYTHON_USE_EXC_INFO_STACK 0
86 #elif defined(PYSTON_VERSION)
87  #define CYTHON_COMPILING_IN_PYPY 0
88  #define CYTHON_COMPILING_IN_PYSTON 1
89  #define CYTHON_COMPILING_IN_CPYTHON 0
90  #ifndef CYTHON_USE_TYPE_SLOTS
91  #define CYTHON_USE_TYPE_SLOTS 1
92  #endif
93  #undef CYTHON_USE_PYTYPE_LOOKUP
94  #define CYTHON_USE_PYTYPE_LOOKUP 0
95  #undef CYTHON_USE_ASYNC_SLOTS
96  #define CYTHON_USE_ASYNC_SLOTS 0
97  #undef CYTHON_USE_PYLIST_INTERNALS
98  #define CYTHON_USE_PYLIST_INTERNALS 0
99  #ifndef CYTHON_USE_UNICODE_INTERNALS
100  #define CYTHON_USE_UNICODE_INTERNALS 1
101  #endif
102  #undef CYTHON_USE_UNICODE_WRITER
103  #define CYTHON_USE_UNICODE_WRITER 0
104  #undef CYTHON_USE_PYLONG_INTERNALS
105  #define CYTHON_USE_PYLONG_INTERNALS 0
106  #ifndef CYTHON_AVOID_BORROWED_REFS
107  #define CYTHON_AVOID_BORROWED_REFS 0
108  #endif
109  #ifndef CYTHON_ASSUME_SAFE_MACROS
110  #define CYTHON_ASSUME_SAFE_MACROS 1
111  #endif
112  #ifndef CYTHON_UNPACK_METHODS
113  #define CYTHON_UNPACK_METHODS 1
114  #endif
115  #undef CYTHON_FAST_THREAD_STATE
116  #define CYTHON_FAST_THREAD_STATE 0
117  #undef CYTHON_FAST_PYCALL
118  #define CYTHON_FAST_PYCALL 0
119  #undef CYTHON_PEP489_MULTI_PHASE_INIT
120  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
121  #undef CYTHON_USE_TP_FINALIZE
122  #define CYTHON_USE_TP_FINALIZE 0
123  #undef CYTHON_USE_DICT_VERSIONS
124  #define CYTHON_USE_DICT_VERSIONS 0
125  #undef CYTHON_USE_EXC_INFO_STACK
126  #define CYTHON_USE_EXC_INFO_STACK 0
127 #else
128  #define CYTHON_COMPILING_IN_PYPY 0
129  #define CYTHON_COMPILING_IN_PYSTON 0
130  #define CYTHON_COMPILING_IN_CPYTHON 1
131  #ifndef CYTHON_USE_TYPE_SLOTS
132  #define CYTHON_USE_TYPE_SLOTS 1
133  #endif
134  #if PY_VERSION_HEX < 0x02070000
135  #undef CYTHON_USE_PYTYPE_LOOKUP
136  #define CYTHON_USE_PYTYPE_LOOKUP 0
137  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
138  #define CYTHON_USE_PYTYPE_LOOKUP 1
139  #endif
140  #if PY_MAJOR_VERSION < 3
141  #undef CYTHON_USE_ASYNC_SLOTS
142  #define CYTHON_USE_ASYNC_SLOTS 0
143  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
144  #define CYTHON_USE_ASYNC_SLOTS 1
145  #endif
146  #if PY_VERSION_HEX < 0x02070000
147  #undef CYTHON_USE_PYLONG_INTERNALS
148  #define CYTHON_USE_PYLONG_INTERNALS 0
149  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
150  #define CYTHON_USE_PYLONG_INTERNALS 1
151  #endif
152  #ifndef CYTHON_USE_PYLIST_INTERNALS
153  #define CYTHON_USE_PYLIST_INTERNALS 1
154  #endif
155  #ifndef CYTHON_USE_UNICODE_INTERNALS
156  #define CYTHON_USE_UNICODE_INTERNALS 1
157  #endif
158  #if PY_VERSION_HEX < 0x030300F0
159  #undef CYTHON_USE_UNICODE_WRITER
160  #define CYTHON_USE_UNICODE_WRITER 0
161  #elif !defined(CYTHON_USE_UNICODE_WRITER)
162  #define CYTHON_USE_UNICODE_WRITER 1
163  #endif
164  #ifndef CYTHON_AVOID_BORROWED_REFS
165  #define CYTHON_AVOID_BORROWED_REFS 0
166  #endif
167  #ifndef CYTHON_ASSUME_SAFE_MACROS
168  #define CYTHON_ASSUME_SAFE_MACROS 1
169  #endif
170  #ifndef CYTHON_UNPACK_METHODS
171  #define CYTHON_UNPACK_METHODS 1
172  #endif
173  #ifndef CYTHON_FAST_THREAD_STATE
174  #define CYTHON_FAST_THREAD_STATE 1
175  #endif
176  #ifndef CYTHON_FAST_PYCALL
177  #define CYTHON_FAST_PYCALL 1
178  #endif
179  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
180  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
181  #endif
182  #ifndef CYTHON_USE_TP_FINALIZE
183  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
184  #endif
185  #ifndef CYTHON_USE_DICT_VERSIONS
186  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
187  #endif
188  #ifndef CYTHON_USE_EXC_INFO_STACK
189  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
190  #endif
191 #endif
192 #if !defined(CYTHON_FAST_PYCCALL)
193 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
194 #endif
195 #if CYTHON_USE_PYLONG_INTERNALS
196  #include "longintrepr.h"
197  #undef SHIFT
198  #undef BASE
199  #undef MASK
200  #ifdef SIZEOF_VOID_P
201  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
202  #endif
203 #endif
204 #ifndef __has_attribute
205  #define __has_attribute(x) 0
206 #endif
207 #ifndef __has_cpp_attribute
208  #define __has_cpp_attribute(x) 0
209 #endif
210 #ifndef CYTHON_RESTRICT
211  #if defined(__GNUC__)
212  #define CYTHON_RESTRICT __restrict__
213  #elif defined(_MSC_VER) && _MSC_VER >= 1400
214  #define CYTHON_RESTRICT __restrict
215  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
216  #define CYTHON_RESTRICT restrict
217  #else
218  #define CYTHON_RESTRICT
219  #endif
220 #endif
221 #ifndef CYTHON_UNUSED
222 # if defined(__GNUC__)
223 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
224 # define CYTHON_UNUSED __attribute__ ((__unused__))
225 # else
226 # define CYTHON_UNUSED
227 # endif
228 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
229 # define CYTHON_UNUSED __attribute__ ((__unused__))
230 # else
231 # define CYTHON_UNUSED
232 # endif
233 #endif
234 #ifndef CYTHON_MAYBE_UNUSED_VAR
235 # if defined(__cplusplus)
236  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
237 # else
238 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
239 # endif
240 #endif
241 #ifndef CYTHON_NCP_UNUSED
242 # if CYTHON_COMPILING_IN_CPYTHON
243 # define CYTHON_NCP_UNUSED
244 # else
245 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
246 # endif
247 #endif
248 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
249 #ifdef _MSC_VER
250  #ifndef _MSC_STDINT_H_
251  #if _MSC_VER < 1300
252  typedef unsigned char uint8_t;
253  typedef unsigned int uint32_t;
254  #else
255  typedef unsigned __int8 uint8_t;
256  typedef unsigned __int32 uint32_t;
257  #endif
258  #endif
259 #else
260  #include <stdint.h>
261 #endif
262 #ifndef CYTHON_FALLTHROUGH
263  #if defined(__cplusplus) && __cplusplus >= 201103L
264  #if __has_cpp_attribute(fallthrough)
265  #define CYTHON_FALLTHROUGH [[fallthrough]]
266  #elif __has_cpp_attribute(clang::fallthrough)
267  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
268  #elif __has_cpp_attribute(gnu::fallthrough)
269  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
270  #endif
271  #endif
272  #ifndef CYTHON_FALLTHROUGH
273  #if __has_attribute(fallthrough)
274  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
275  #else
276  #define CYTHON_FALLTHROUGH
277  #endif
278  #endif
279  #if defined(__clang__ ) && defined(__apple_build_version__)
280  #if __apple_build_version__ < 7000000
281  #undef CYTHON_FALLTHROUGH
282  #define CYTHON_FALLTHROUGH
283  #endif
284  #endif
285 #endif
286 
287 #ifndef __cplusplus
288  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
289 #endif
290 #ifndef CYTHON_INLINE
291  #if defined(__clang__)
292  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
293  #else
294  #define CYTHON_INLINE inline
295  #endif
296 #endif
297 template<typename T>
298 void __Pyx_call_destructor(T& x) {
299  x.~T();
300 }
301 template<typename T>
302 class __Pyx_FakeReference {
303  public:
304  __Pyx_FakeReference() : ptr(NULL) { }
305  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
306  T *operator->() { return ptr; }
307  T *operator&() { return ptr; }
308  operator T&() { return *ptr; }
309  template<typename U> bool operator ==(U other) { return *ptr == other; }
310  template<typename U> bool operator !=(U other) { return *ptr != other; }
311  private:
312  T *ptr;
313 };
314 
315 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
316  #define Py_OptimizeFlag 0
317 #endif
318 #define __PYX_BUILD_PY_SSIZE_T "n"
319 #define CYTHON_FORMAT_SSIZE_T "z"
320 #if PY_MAJOR_VERSION < 3
321  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
322  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
323  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
324  #define __Pyx_DefaultClassType PyClass_Type
325 #else
326  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
327  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
328  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
329  #define __Pyx_DefaultClassType PyType_Type
330 #endif
331 #ifndef Py_TPFLAGS_CHECKTYPES
332  #define Py_TPFLAGS_CHECKTYPES 0
333 #endif
334 #ifndef Py_TPFLAGS_HAVE_INDEX
335  #define Py_TPFLAGS_HAVE_INDEX 0
336 #endif
337 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
338  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
339 #endif
340 #ifndef Py_TPFLAGS_HAVE_FINALIZE
341  #define Py_TPFLAGS_HAVE_FINALIZE 0
342 #endif
343 #ifndef METH_STACKLESS
344  #define METH_STACKLESS 0
345 #endif
346 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
347  #ifndef METH_FASTCALL
348  #define METH_FASTCALL 0x80
349  #endif
350  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
351  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
352  Py_ssize_t nargs, PyObject *kwnames);
353 #else
354  #define __Pyx_PyCFunctionFast _PyCFunctionFast
355  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
356 #endif
357 #if CYTHON_FAST_PYCCALL
358 #define __Pyx_PyFastCFunction_Check(func)\
359  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
360 #else
361 #define __Pyx_PyFastCFunction_Check(func) 0
362 #endif
363 #if CYTHON_USE_DICT_VERSIONS
364 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
365 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
366  (version_var) = __PYX_GET_DICT_VERSION(dict);\
367  (cache_var) = (value);
368 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
369  static PY_UINT64_T __pyx_dict_version = 0;\
370  static PyObject *__pyx_dict_cached_value = NULL;\
371  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
372  (VAR) = __pyx_dict_cached_value;\
373  } else {\
374  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
375  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
376  }\
377  }
378 #else
379 #define __PYX_GET_DICT_VERSION(dict) (0)
380 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
381 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
382 #endif
383 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
384  #define PyObject_Malloc(s) PyMem_Malloc(s)
385  #define PyObject_Free(p) PyMem_Free(p)
386  #define PyObject_Realloc(p) PyMem_Realloc(p)
387 #endif
388 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
389  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
390  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
391  #define PyMem_RawFree(p) PyMem_Free(p)
392 #endif
393 #if CYTHON_COMPILING_IN_PYSTON
394  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
395  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
396 #else
397  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
398  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
399 #endif
400 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
401  #define __Pyx_PyThreadState_Current PyThreadState_GET()
402 #elif PY_VERSION_HEX >= 0x03060000
403  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
404 #elif PY_VERSION_HEX >= 0x03000000
405  #define __Pyx_PyThreadState_Current PyThreadState_GET()
406 #else
407  #define __Pyx_PyThreadState_Current _PyThreadState_Current
408 #endif
409 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
410 #include "pythread.h"
411 #define Py_tss_NEEDS_INIT 0
412 typedef int Py_tss_t;
413 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
414  *key = PyThread_create_key();
415  return 0; // PyThread_create_key reports success always
416 }
417 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
418  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
419  *key = Py_tss_NEEDS_INIT;
420  return key;
421 }
422 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
423  PyObject_Free(key);
424 }
425 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
426  return *key != Py_tss_NEEDS_INIT;
427 }
428 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
429  PyThread_delete_key(*key);
430  *key = Py_tss_NEEDS_INIT;
431 }
432 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
433  return PyThread_set_key_value(*key, value);
434 }
435 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
436  return PyThread_get_key_value(*key);
437 }
438 #endif // TSS (Thread Specific Storage) API
439 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
440 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
441 #else
442 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
443 #endif
444 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
445  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
446  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
447 #else
448  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
449  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
450 #endif
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
452 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
453 #else
454 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
455 #endif
456 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
457  #define CYTHON_PEP393_ENABLED 1
458  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
459  0 : _PyUnicode_Ready((PyObject *)(op)))
460  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
461  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
462  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
463  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
464  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
465  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
466  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
467  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
468 #else
469  #define CYTHON_PEP393_ENABLED 0
470  #define PyUnicode_1BYTE_KIND 1
471  #define PyUnicode_2BYTE_KIND 2
472  #define PyUnicode_4BYTE_KIND 4
473  #define __Pyx_PyUnicode_READY(op) (0)
474  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
475  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
476  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
477  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
478  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
479  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
480  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
481  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
482 #endif
483 #if CYTHON_COMPILING_IN_PYPY
484  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
485  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
486 #else
487  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
488  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
489  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
490 #endif
491 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
492  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
493 #endif
494 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
495  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
496 #endif
497 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
498  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
499 #endif
500 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
501 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
502 #if PY_MAJOR_VERSION >= 3
503  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
504 #else
505  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
506 #endif
507 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
508  #define PyObject_ASCII(o) PyObject_Repr(o)
509 #endif
510 #if PY_MAJOR_VERSION >= 3
511  #define PyBaseString_Type PyUnicode_Type
512  #define PyStringObject PyUnicodeObject
513  #define PyString_Type PyUnicode_Type
514  #define PyString_Check PyUnicode_Check
515  #define PyString_CheckExact PyUnicode_CheckExact
516  #define PyObject_Unicode PyObject_Str
517 #endif
518 #if PY_MAJOR_VERSION >= 3
519  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
520  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
521 #else
522  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
523  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
524 #endif
525 #ifndef PySet_CheckExact
526  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
527 #endif
528 #if CYTHON_ASSUME_SAFE_MACROS
529  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
530 #else
531  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
532 #endif
533 #if PY_MAJOR_VERSION >= 3
534  #define PyIntObject PyLongObject
535  #define PyInt_Type PyLong_Type
536  #define PyInt_Check(op) PyLong_Check(op)
537  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
538  #define PyInt_FromString PyLong_FromString
539  #define PyInt_FromUnicode PyLong_FromUnicode
540  #define PyInt_FromLong PyLong_FromLong
541  #define PyInt_FromSize_t PyLong_FromSize_t
542  #define PyInt_FromSsize_t PyLong_FromSsize_t
543  #define PyInt_AsLong PyLong_AsLong
544  #define PyInt_AS_LONG PyLong_AS_LONG
545  #define PyInt_AsSsize_t PyLong_AsSsize_t
546  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
547  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
548  #define PyNumber_Int PyNumber_Long
549 #endif
550 #if PY_MAJOR_VERSION >= 3
551  #define PyBoolObject PyLongObject
552 #endif
553 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
554  #ifndef PyUnicode_InternFromString
555  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
556  #endif
557 #endif
558 #if PY_VERSION_HEX < 0x030200A4
559  typedef long Py_hash_t;
560  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
561  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
562 #else
563  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
564  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
565 #endif
566 #if PY_MAJOR_VERSION >= 3
567  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
568 #else
569  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
570 #endif
571 #if CYTHON_USE_ASYNC_SLOTS
572  #if PY_VERSION_HEX >= 0x030500B1
573  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
574  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
575  #else
576  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
577  #endif
578 #else
579  #define __Pyx_PyType_AsAsync(obj) NULL
580 #endif
581 #ifndef __Pyx_PyAsyncMethodsStruct
582  typedef struct {
583  unaryfunc am_await;
584  unaryfunc am_aiter;
585  unaryfunc am_anext;
586  } __Pyx_PyAsyncMethodsStruct;
587 #endif
588 
589 #if defined(WIN32) || defined(MS_WINDOWS)
590  #define _USE_MATH_DEFINES
591 #endif
592 #include <math.h>
593 #ifdef NAN
594 #define __PYX_NAN() ((float) NAN)
595 #else
596 static CYTHON_INLINE float __PYX_NAN() {
597  float value;
598  memset(&value, 0xFF, sizeof(value));
599  return value;
600 }
601 #endif
602 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
603 #define __Pyx_truncl trunc
604 #else
605 #define __Pyx_truncl truncl
606 #endif
607 
608 
609 #define __PYX_ERR(f_index, lineno, Ln_error) \
610 { \
611  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
612 }
613 
614 #ifndef __PYX_EXTERN_C
615  #ifdef __cplusplus
616  #define __PYX_EXTERN_C extern "C"
617  #else
618  #define __PYX_EXTERN_C extern
619  #endif
620 #endif
621 
622 #define __PYX_HAVE__ADR
623 #define __PYX_HAVE_API__ADR
624 /* Early includes */
625 #include <string.h>
626 #include <stdio.h>
627 #include "numpy/arrayobject.h"
628 #include "numpy/ufuncobject.h"
629 #include "ADR.h"
630 #ifdef _OPENMP
631 #include <omp.h>
632 #endif /* _OPENMP */
633 
634 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
635 #define CYTHON_WITHOUT_ASSERTIONS
636 #endif
637 
638 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
639  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
640 
641 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
642 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
643 #define __PYX_DEFAULT_STRING_ENCODING ""
644 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
645 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
646 #define __Pyx_uchar_cast(c) ((unsigned char)c)
647 #define __Pyx_long_cast(x) ((long)x)
648 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
649  (sizeof(type) < sizeof(Py_ssize_t)) ||\
650  (sizeof(type) > sizeof(Py_ssize_t) &&\
651  likely(v < (type)PY_SSIZE_T_MAX ||\
652  v == (type)PY_SSIZE_T_MAX) &&\
653  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
654  v == (type)PY_SSIZE_T_MIN))) ||\
655  (sizeof(type) == sizeof(Py_ssize_t) &&\
656  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
657  v == (type)PY_SSIZE_T_MAX))) )
658 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
659  return (size_t) i < (size_t) limit;
660 }
661 #if defined (__cplusplus) && __cplusplus >= 201103L
662  #include <cstdlib>
663  #define __Pyx_sst_abs(value) std::abs(value)
664 #elif SIZEOF_INT >= SIZEOF_SIZE_T
665  #define __Pyx_sst_abs(value) abs(value)
666 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
667  #define __Pyx_sst_abs(value) labs(value)
668 #elif defined (_MSC_VER)
669  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
670 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
671  #define __Pyx_sst_abs(value) llabs(value)
672 #elif defined (__GNUC__)
673  #define __Pyx_sst_abs(value) __builtin_llabs(value)
674 #else
675  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
676 #endif
677 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
678 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
679 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
680 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
681 #define __Pyx_PyBytes_FromString PyBytes_FromString
682 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
683 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
684 #if PY_MAJOR_VERSION < 3
685  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
686  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
687 #else
688  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
689  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
690 #endif
691 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
692 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
693 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
694 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
695 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
696 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
697 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
698 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
699 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
700 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
701 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
702 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
703 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
704 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
705 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
706 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
707 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
708  const Py_UNICODE *u_end = u;
709  while (*u_end++) ;
710  return (size_t)(u_end - u - 1);
711 }
712 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
713 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
714 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
715 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
716 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
717 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
718 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
719 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
720 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
721 #define __Pyx_PySequence_Tuple(obj)\
722  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
723 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
724 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
725 #if CYTHON_ASSUME_SAFE_MACROS
726 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
727 #else
728 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
729 #endif
730 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
731 #if PY_MAJOR_VERSION >= 3
732 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
733 #else
734 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
735 #endif
736 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
737 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
738 static int __Pyx_sys_getdefaultencoding_not_ascii;
739 static int __Pyx_init_sys_getdefaultencoding_params(void) {
740  PyObject* sys;
741  PyObject* default_encoding = NULL;
742  PyObject* ascii_chars_u = NULL;
743  PyObject* ascii_chars_b = NULL;
744  const char* default_encoding_c;
745  sys = PyImport_ImportModule("sys");
746  if (!sys) goto bad;
747  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
748  Py_DECREF(sys);
749  if (!default_encoding) goto bad;
750  default_encoding_c = PyBytes_AsString(default_encoding);
751  if (!default_encoding_c) goto bad;
752  if (strcmp(default_encoding_c, "ascii") == 0) {
753  __Pyx_sys_getdefaultencoding_not_ascii = 0;
754  } else {
755  char ascii_chars[128];
756  int c;
757  for (c = 0; c < 128; c++) {
758  ascii_chars[c] = c;
759  }
760  __Pyx_sys_getdefaultencoding_not_ascii = 1;
761  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
762  if (!ascii_chars_u) goto bad;
763  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
764  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
765  PyErr_Format(
766  PyExc_ValueError,
767  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
768  default_encoding_c);
769  goto bad;
770  }
771  Py_DECREF(ascii_chars_u);
772  Py_DECREF(ascii_chars_b);
773  }
774  Py_DECREF(default_encoding);
775  return 0;
776 bad:
777  Py_XDECREF(default_encoding);
778  Py_XDECREF(ascii_chars_u);
779  Py_XDECREF(ascii_chars_b);
780  return -1;
781 }
782 #endif
783 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
784 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
785 #else
786 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
787 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
788 static char* __PYX_DEFAULT_STRING_ENCODING;
789 static int __Pyx_init_sys_getdefaultencoding_params(void) {
790  PyObject* sys;
791  PyObject* default_encoding = NULL;
792  char* default_encoding_c;
793  sys = PyImport_ImportModule("sys");
794  if (!sys) goto bad;
795  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
796  Py_DECREF(sys);
797  if (!default_encoding) goto bad;
798  default_encoding_c = PyBytes_AsString(default_encoding);
799  if (!default_encoding_c) goto bad;
800  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
801  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
802  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
803  Py_DECREF(default_encoding);
804  return 0;
805 bad:
806  Py_XDECREF(default_encoding);
807  return -1;
808 }
809 #endif
810 #endif
811 
812 
813 /* Test for GCC > 2.95 */
814 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
815  #define likely(x) __builtin_expect(!!(x), 1)
816  #define unlikely(x) __builtin_expect(!!(x), 0)
817 #else /* !__GNUC__ or GCC < 2.95 */
818  #define likely(x) (x)
819  #define unlikely(x) (x)
820 #endif /* __GNUC__ */
821 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
822 
823 static PyObject *__pyx_m = NULL;
824 static PyObject *__pyx_d;
825 static PyObject *__pyx_b;
826 static PyObject *__pyx_cython_runtime = NULL;
827 static PyObject *__pyx_empty_tuple;
828 static PyObject *__pyx_empty_bytes;
829 static PyObject *__pyx_empty_unicode;
830 static int __pyx_lineno;
831 static int __pyx_clineno = 0;
832 static const char * __pyx_cfilenm= __FILE__;
833 static const char *__pyx_filename;
834 
835 /* Header.proto */
836 #if !defined(CYTHON_CCOMPLEX)
837  #if defined(__cplusplus)
838  #define CYTHON_CCOMPLEX 1
839  #elif defined(_Complex_I)
840  #define CYTHON_CCOMPLEX 1
841  #else
842  #define CYTHON_CCOMPLEX 0
843  #endif
844 #endif
845 #if CYTHON_CCOMPLEX
846  #ifdef __cplusplus
847  #include <complex>
848  #else
849  #include <complex.h>
850  #endif
851 #endif
852 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
853  #undef _Complex_I
854  #define _Complex_I 1.0fj
855 #endif
856 
857 
858 static const char *__pyx_f[] = {
859  "stringsource",
860  "proteus/ADR.pyx",
861  "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd",
862  "linux/lib/python3.7/site-packages/Cython/Includes/cpython/type.pxd",
863 };
864 
865 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
866  * # in Cython to enable them only on the right systems.
867  *
868  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
869  * ctypedef npy_int16 int16_t
870  * ctypedef npy_int32 int32_t
871  */
872 typedef npy_int8 __pyx_t_5numpy_int8_t;
873 
874 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
875  *
876  * ctypedef npy_int8 int8_t
877  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
878  * ctypedef npy_int32 int32_t
879  * ctypedef npy_int64 int64_t
880  */
881 typedef npy_int16 __pyx_t_5numpy_int16_t;
882 
883 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
884  * ctypedef npy_int8 int8_t
885  * ctypedef npy_int16 int16_t
886  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
887  * ctypedef npy_int64 int64_t
888  * #ctypedef npy_int96 int96_t
889  */
890 typedef npy_int32 __pyx_t_5numpy_int32_t;
891 
892 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
893  * ctypedef npy_int16 int16_t
894  * ctypedef npy_int32 int32_t
895  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
896  * #ctypedef npy_int96 int96_t
897  * #ctypedef npy_int128 int128_t
898  */
899 typedef npy_int64 __pyx_t_5numpy_int64_t;
900 
901 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
902  * #ctypedef npy_int128 int128_t
903  *
904  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
905  * ctypedef npy_uint16 uint16_t
906  * ctypedef npy_uint32 uint32_t
907  */
908 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
909 
910 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
911  *
912  * ctypedef npy_uint8 uint8_t
913  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
914  * ctypedef npy_uint32 uint32_t
915  * ctypedef npy_uint64 uint64_t
916  */
917 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
918 
919 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
920  * ctypedef npy_uint8 uint8_t
921  * ctypedef npy_uint16 uint16_t
922  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
923  * ctypedef npy_uint64 uint64_t
924  * #ctypedef npy_uint96 uint96_t
925  */
926 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
927 
928 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786
929  * ctypedef npy_uint16 uint16_t
930  * ctypedef npy_uint32 uint32_t
931  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
932  * #ctypedef npy_uint96 uint96_t
933  * #ctypedef npy_uint128 uint128_t
934  */
935 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
936 
937 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
938  * #ctypedef npy_uint128 uint128_t
939  *
940  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
941  * ctypedef npy_float64 float64_t
942  * #ctypedef npy_float80 float80_t
943  */
944 typedef npy_float32 __pyx_t_5numpy_float32_t;
945 
946 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
947  *
948  * ctypedef npy_float32 float32_t
949  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
950  * #ctypedef npy_float80 float80_t
951  * #ctypedef npy_float128 float128_t
952  */
953 typedef npy_float64 __pyx_t_5numpy_float64_t;
954 
955 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800
956  * # The int types are mapped a bit surprising --
957  * # numpy.int corresponds to 'l' and numpy.long to 'q'
958  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
959  * ctypedef npy_longlong long_t
960  * ctypedef npy_longlong longlong_t
961  */
962 typedef npy_long __pyx_t_5numpy_int_t;
963 
964 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
965  * # numpy.int corresponds to 'l' and numpy.long to 'q'
966  * ctypedef npy_long int_t
967  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
968  * ctypedef npy_longlong longlong_t
969  *
970  */
971 typedef npy_longlong __pyx_t_5numpy_long_t;
972 
973 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
974  * ctypedef npy_long int_t
975  * ctypedef npy_longlong long_t
976  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
977  *
978  * ctypedef npy_ulong uint_t
979  */
980 typedef npy_longlong __pyx_t_5numpy_longlong_t;
981 
982 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804
983  * ctypedef npy_longlong longlong_t
984  *
985  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
986  * ctypedef npy_ulonglong ulong_t
987  * ctypedef npy_ulonglong ulonglong_t
988  */
989 typedef npy_ulong __pyx_t_5numpy_uint_t;
990 
991 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
992  *
993  * ctypedef npy_ulong uint_t
994  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
995  * ctypedef npy_ulonglong ulonglong_t
996  *
997  */
998 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
999 
1000 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806
1001  * ctypedef npy_ulong uint_t
1002  * ctypedef npy_ulonglong ulong_t
1003  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1004  *
1005  * ctypedef npy_intp intp_t
1006  */
1007 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1008 
1009 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808
1010  * ctypedef npy_ulonglong ulonglong_t
1011  *
1012  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1013  * ctypedef npy_uintp uintp_t
1014  *
1015  */
1016 typedef npy_intp __pyx_t_5numpy_intp_t;
1017 
1018 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
1019  *
1020  * ctypedef npy_intp intp_t
1021  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1022  *
1023  * ctypedef npy_double float_t
1024  */
1025 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1026 
1027 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811
1028  * ctypedef npy_uintp uintp_t
1029  *
1030  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1031  * ctypedef npy_double double_t
1032  * ctypedef npy_longdouble longdouble_t
1033  */
1034 typedef npy_double __pyx_t_5numpy_float_t;
1035 
1036 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
1037  *
1038  * ctypedef npy_double float_t
1039  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1040  * ctypedef npy_longdouble longdouble_t
1041  *
1042  */
1043 typedef npy_double __pyx_t_5numpy_double_t;
1044 
1045 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
1046  * ctypedef npy_double float_t
1047  * ctypedef npy_double double_t
1048  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1049  *
1050  * ctypedef npy_cfloat cfloat_t
1051  */
1052 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1053 /* Declarations.proto */
1054 #if CYTHON_CCOMPLEX
1055  #ifdef __cplusplus
1056  typedef ::std::complex< float > __pyx_t_float_complex;
1057  #else
1058  typedef float _Complex __pyx_t_float_complex;
1059  #endif
1060 #else
1061  typedef struct { float real, imag; } __pyx_t_float_complex;
1062 #endif
1063 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1064 
1065 /* Declarations.proto */
1066 #if CYTHON_CCOMPLEX
1067  #ifdef __cplusplus
1068  typedef ::std::complex< double > __pyx_t_double_complex;
1069  #else
1070  typedef double _Complex __pyx_t_double_complex;
1071  #endif
1072 #else
1073  typedef struct { double real, imag; } __pyx_t_double_complex;
1074 #endif
1075 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1076 
1077 
1078 /*--- Type declarations ---*/
1079 struct __pyx_obj_3ADR_ADR;
1080 
1081 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
1082  * ctypedef npy_longdouble longdouble_t
1083  *
1084  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1085  * ctypedef npy_cdouble cdouble_t
1086  * ctypedef npy_clongdouble clongdouble_t
1087  */
1088 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1089 
1090 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
1091  *
1092  * ctypedef npy_cfloat cfloat_t
1093  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1094  * ctypedef npy_clongdouble clongdouble_t
1095  *
1096  */
1097 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1098 
1099 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817
1100  * ctypedef npy_cfloat cfloat_t
1101  * ctypedef npy_cdouble cdouble_t
1102  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1103  *
1104  * ctypedef npy_cdouble complex_t
1105  */
1106 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1107 
1108 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819
1109  * ctypedef npy_clongdouble clongdouble_t
1110  *
1111  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1112  *
1113  * cdef inline object PyArray_MultiIterNew1(a):
1114  */
1115 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1116 
1117 /* "ADR.pyx":140
1118  *
1119  *
1120  * cdef class ADR: # <<<<<<<<<<<<<<
1121  * """
1122  * Optimized ADR member functions
1123  */
1124 struct __pyx_obj_3ADR_ADR {
1125  PyObject_HEAD
1126  proteus::cppADR_base *thisptr;
1127 };
1128 
1129 
1130 /* --- Runtime support code (head) --- */
1131 /* Refnanny.proto */
1132 #ifndef CYTHON_REFNANNY
1133  #define CYTHON_REFNANNY 0
1134 #endif
1135 #if CYTHON_REFNANNY
1136  typedef struct {
1137  void (*INCREF)(void*, PyObject*, int);
1138  void (*DECREF)(void*, PyObject*, int);
1139  void (*GOTREF)(void*, PyObject*, int);
1140  void (*GIVEREF)(void*, PyObject*, int);
1141  void* (*SetupContext)(const char*, int, const char*);
1142  void (*FinishContext)(void**);
1143  } __Pyx_RefNannyAPIStruct;
1144  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1145  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1146  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1147 #ifdef WITH_THREAD
1148  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1149  if (acquire_gil) {\
1150  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1151  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1152  PyGILState_Release(__pyx_gilstate_save);\
1153  } else {\
1154  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1155  }
1156 #else
1157  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1158  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1159 #endif
1160  #define __Pyx_RefNannyFinishContext()\
1161  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1162  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1163  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1164  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1165  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1166  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1167  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1168  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1169  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1170 #else
1171  #define __Pyx_RefNannyDeclarations
1172  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1173  #define __Pyx_RefNannyFinishContext()
1174  #define __Pyx_INCREF(r) Py_INCREF(r)
1175  #define __Pyx_DECREF(r) Py_DECREF(r)
1176  #define __Pyx_GOTREF(r)
1177  #define __Pyx_GIVEREF(r)
1178  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1179  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1180  #define __Pyx_XGOTREF(r)
1181  #define __Pyx_XGIVEREF(r)
1182 #endif
1183 #define __Pyx_XDECREF_SET(r, v) do {\
1184  PyObject *tmp = (PyObject *) r;\
1185  r = v; __Pyx_XDECREF(tmp);\
1186  } while (0)
1187 #define __Pyx_DECREF_SET(r, v) do {\
1188  PyObject *tmp = (PyObject *) r;\
1189  r = v; __Pyx_DECREF(tmp);\
1190  } while (0)
1191 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1192 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1193 
1194 /* PyObjectGetAttrStr.proto */
1195 #if CYTHON_USE_TYPE_SLOTS
1196 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1197 #else
1198 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1199 #endif
1200 
1201 /* GetBuiltinName.proto */
1202 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1203 
1204 /* RaiseArgTupleInvalid.proto */
1205 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1206  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1207 
1208 /* RaiseDoubleKeywords.proto */
1209 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1210 
1211 /* ParseKeywords.proto */
1212 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1213  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1214  const char* function_name);
1215 
1216 /* ArgTypeTest.proto */
1217 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1218  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1219  __Pyx__ArgTypeTest(obj, type, name, exact))
1220 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1221 
1222 /* PyFunctionFastCall.proto */
1223 #if CYTHON_FAST_PYCALL
1224 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1225  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1226 #if 1 || PY_VERSION_HEX < 0x030600B1
1227 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1228 #else
1229 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1230 #endif
1231 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1232  (sizeof(char [1 - 2*!(cond)]) - 1)
1233 #ifndef Py_MEMBER_SIZE
1234 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1235 #endif
1236  static size_t __pyx_pyframe_localsplus_offset = 0;
1237  #include "frameobject.h"
1238  #define __Pxy_PyFrame_Initialize_Offsets()\
1239  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1240  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1241  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1242  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1243 #endif
1244 
1245 /* PyObjectCall.proto */
1246 #if CYTHON_COMPILING_IN_CPYTHON
1247 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1248 #else
1249 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1250 #endif
1251 
1252 /* PyObjectCallMethO.proto */
1253 #if CYTHON_COMPILING_IN_CPYTHON
1254 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1255 #endif
1256 
1257 /* PyObjectCallNoArg.proto */
1258 #if CYTHON_COMPILING_IN_CPYTHON
1259 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1260 #else
1261 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1262 #endif
1263 
1264 /* PyCFunctionFastCall.proto */
1265 #if CYTHON_FAST_PYCCALL
1266 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1267 #else
1268 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1269 #endif
1270 
1271 /* PyObjectCallOneArg.proto */
1272 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1273 
1274 /* RaiseTooManyValuesToUnpack.proto */
1275 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1276 
1277 /* RaiseNeedMoreValuesToUnpack.proto */
1278 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1279 
1280 /* IterFinish.proto */
1281 static CYTHON_INLINE int __Pyx_IterFinish(void);
1282 
1283 /* UnpackItemEndCheck.proto */
1284 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1285 
1286 /* ExtTypeTest.proto */
1287 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1288 
1289 /* PyThreadStateGet.proto */
1290 #if CYTHON_FAST_THREAD_STATE
1291 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1292 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1293 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1294 #else
1295 #define __Pyx_PyThreadState_declare
1296 #define __Pyx_PyThreadState_assign
1297 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1298 #endif
1299 
1300 /* PyErrFetchRestore.proto */
1301 #if CYTHON_FAST_THREAD_STATE
1302 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1303 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1304 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1305 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1306 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1307 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1308 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1309 #if CYTHON_COMPILING_IN_CPYTHON
1310 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1311 #else
1312 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1313 #endif
1314 #else
1315 #define __Pyx_PyErr_Clear() PyErr_Clear()
1316 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1317 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1318 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1319 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1320 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1321 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1322 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1323 #endif
1324 
1325 /* RaiseException.proto */
1326 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1327 
1328 /* GetModuleGlobalName.proto */
1329 #if CYTHON_USE_DICT_VERSIONS
1330 #define __Pyx_GetModuleGlobalName(var, name) {\
1331  static PY_UINT64_T __pyx_dict_version = 0;\
1332  static PyObject *__pyx_dict_cached_value = NULL;\
1333  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1334  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1335  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1336 }
1337 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1338  PY_UINT64_T __pyx_dict_version;\
1339  PyObject *__pyx_dict_cached_value;\
1340  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1341 }
1342 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1343 #else
1344 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1345 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1346 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1347 #endif
1348 
1349 /* PyObjectSetAttrStr.proto */
1350 #if CYTHON_USE_TYPE_SLOTS
1351 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
1352 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
1353 #else
1354 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
1355 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1356 #endif
1357 
1358 /* PyObjectCall2Args.proto */
1359 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1360 
1361 /* ListAppend.proto */
1362 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1363 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1364  PyListObject* L = (PyListObject*) list;
1365  Py_ssize_t len = Py_SIZE(list);
1366  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1367  Py_INCREF(x);
1368  PyList_SET_ITEM(list, len, x);
1369  Py_SIZE(list) = len+1;
1370  return 0;
1371  }
1372  return PyList_Append(list, x);
1373 }
1374 #else
1375 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1376 #endif
1377 
1378 /* PyObjectGetMethod.proto */
1379 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1380 
1381 /* PyObjectCallMethod1.proto */
1382 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1383 
1384 /* append.proto */
1385 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
1386 
1387 /* GetItemInt.proto */
1388 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1389  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1390  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1391  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1392  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1393 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1394  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1395  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1396  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1397 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1398  int wraparound, int boundscheck);
1399 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1400  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1401  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1402  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1403 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1404  int wraparound, int boundscheck);
1405 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1406 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1407  int is_list, int wraparound, int boundscheck);
1408 
1409 /* ObjectGetItem.proto */
1410 #if CYTHON_USE_TYPE_SLOTS
1411 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1412 #else
1413 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1414 #endif
1415 
1416 /* PyIntBinop.proto */
1417 #if !CYTHON_COMPILING_IN_PYPY
1418 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1419 #else
1420 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1421  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1422 #endif
1423 
1424 /* SliceObject.proto */
1425 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1426  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1427 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
1428  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1429  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1430  int has_cstart, int has_cstop, int wraparound);
1431 
1432 /* ListCompAppend.proto */
1433 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1434 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1435  PyListObject* L = (PyListObject*) list;
1436  Py_ssize_t len = Py_SIZE(list);
1437  if (likely(L->allocated > len)) {
1438  Py_INCREF(x);
1439  PyList_SET_ITEM(list, len, x);
1440  Py_SIZE(list) = len+1;
1441  return 0;
1442  }
1443  return PyList_Append(list, x);
1444 }
1445 #else
1446 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1447 #endif
1448 
1449 /* DictGetItem.proto */
1450 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1451 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
1452 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
1453  (likely(PyDict_CheckExact(obj)) ?\
1454  __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
1455 #else
1456 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1457 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
1458 #endif
1459 
1460 /* SliceObject.proto */
1461 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1462  PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1463  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1464  int has_cstart, int has_cstop, int wraparound);
1465 
1466 /* Import.proto */
1467 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1468 
1469 /* ImportFrom.proto */
1470 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1471 
1472 /* IncludeStringH.proto */
1473 #include <string.h>
1474 
1475 /* BytesEquals.proto */
1476 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1477 
1478 /* UnicodeEquals.proto */
1479 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1480 
1481 /* StrEquals.proto */
1482 #if PY_MAJOR_VERSION >= 3
1483 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1484 #else
1485 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1486 #endif
1487 
1488 /* PyIntCompare.proto */
1489 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1490 
1491 /* PyObjectCallMethod0.proto */
1492 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
1493 
1494 /* RaiseNoneIterError.proto */
1495 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1496 
1497 /* UnpackTupleError.proto */
1498 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
1499 
1500 /* UnpackTuple2.proto */
1501 #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
1502  (likely(is_tuple || PyTuple_Check(tuple)) ?\
1503  (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
1504  __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
1505  (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
1506  __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
1507 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
1508  PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
1509 static int __Pyx_unpack_tuple2_generic(
1510  PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
1511 
1512 /* dict_iter.proto */
1513 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
1514  Py_ssize_t* p_orig_length, int* p_is_dict);
1515 static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
1516  PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
1517 
1518 /* GetTopmostException.proto */
1519 #if CYTHON_USE_EXC_INFO_STACK
1520 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1521 #endif
1522 
1523 /* SaveResetException.proto */
1524 #if CYTHON_FAST_THREAD_STATE
1525 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1526 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1527 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1528 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1529 #else
1530 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1531 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1532 #endif
1533 
1534 /* PyErrExceptionMatches.proto */
1535 #if CYTHON_FAST_THREAD_STATE
1536 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1537 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1538 #else
1539 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1540 #endif
1541 
1542 /* GetException.proto */
1543 #if CYTHON_FAST_THREAD_STATE
1544 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1545 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1546 #else
1547 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1548 #endif
1549 
1550 /* PyObject_GenericGetAttrNoDict.proto */
1551 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1552 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1553 #else
1554 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1555 #endif
1556 
1557 /* PyObject_GenericGetAttr.proto */
1558 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1559 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1560 #else
1561 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1562 #endif
1563 
1564 /* SetupReduce.proto */
1565 static int __Pyx_setup_reduce(PyObject* type_obj);
1566 
1567 /* TypeImport.proto */
1568 #ifndef __PYX_HAVE_RT_ImportType_proto
1569 #define __PYX_HAVE_RT_ImportType_proto
1570 enum __Pyx_ImportType_CheckSize {
1571  __Pyx_ImportType_CheckSize_Error = 0,
1572  __Pyx_ImportType_CheckSize_Warn = 1,
1573  __Pyx_ImportType_CheckSize_Ignore = 2
1574 };
1575 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1576 #endif
1577 
1578 /* CalculateMetaclass.proto */
1579 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
1580 
1581 /* FetchCommonType.proto */
1582 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1583 
1584 /* CythonFunction.proto */
1585 #define __Pyx_CyFunction_USED 1
1586 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
1587 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
1588 #define __Pyx_CYFUNCTION_CCLASS 0x04
1589 #define __Pyx_CyFunction_GetClosure(f)\
1590  (((__pyx_CyFunctionObject *) (f))->func_closure)
1591 #define __Pyx_CyFunction_GetClassObj(f)\
1592  (((__pyx_CyFunctionObject *) (f))->func_classobj)
1593 #define __Pyx_CyFunction_Defaults(type, f)\
1594  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1595 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
1596  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1597 typedef struct {
1598  PyCFunctionObject func;
1599 #if PY_VERSION_HEX < 0x030500A0
1600  PyObject *func_weakreflist;
1601 #endif
1602  PyObject *func_dict;
1603  PyObject *func_name;
1604  PyObject *func_qualname;
1605  PyObject *func_doc;
1606  PyObject *func_globals;
1607  PyObject *func_code;
1608  PyObject *func_closure;
1609  PyObject *func_classobj;
1610  void *defaults;
1611  int defaults_pyobjects;
1612  int flags;
1613  PyObject *defaults_tuple;
1614  PyObject *defaults_kwdict;
1615  PyObject *(*defaults_getter)(PyObject *);
1616  PyObject *func_annotations;
1617 } __pyx_CyFunctionObject;
1618 static PyTypeObject *__pyx_CyFunctionType = 0;
1619 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
1620 #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
1621  __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
1622 static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
1623  int flags, PyObject* qualname,
1624  PyObject *self,
1625  PyObject *module, PyObject *globals,
1626  PyObject* code);
1627 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1628  size_t size,
1629  int pyobjects);
1630 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1631  PyObject *tuple);
1632 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1633  PyObject *dict);
1634 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1635  PyObject *dict);
1636 static int __pyx_CyFunction_init(void);
1637 
1638 /* SetNameInClass.proto */
1639 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
1640 #define __Pyx_SetNameInClass(ns, name, value)\
1641  (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
1642 #elif CYTHON_COMPILING_IN_CPYTHON
1643 #define __Pyx_SetNameInClass(ns, name, value)\
1644  (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
1645 #else
1646 #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
1647 #endif
1648 
1649 /* Py3ClassCreate.proto */
1650 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
1651  PyObject *mkw, PyObject *modname, PyObject *doc);
1652 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
1653  PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
1654 
1655 /* CLineInTraceback.proto */
1656 #ifdef CYTHON_CLINE_IN_TRACEBACK
1657 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1658 #else
1659 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1660 #endif
1661 
1662 /* CodeObjectCache.proto */
1663 typedef struct {
1664  PyCodeObject* code_object;
1665  int code_line;
1666 } __Pyx_CodeObjectCacheEntry;
1667 struct __Pyx_CodeObjectCache {
1668  int count;
1669  int max_count;
1670  __Pyx_CodeObjectCacheEntry* entries;
1671 };
1672 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1673 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1674 static PyCodeObject *__pyx_find_code_object(int code_line);
1675 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1676 
1677 /* AddTraceback.proto */
1678 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1679  int py_line, const char *filename);
1680 
1681 /* CIntToPy.proto */
1682 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1683 
1684 /* RealImag.proto */
1685 #if CYTHON_CCOMPLEX
1686  #ifdef __cplusplus
1687  #define __Pyx_CREAL(z) ((z).real())
1688  #define __Pyx_CIMAG(z) ((z).imag())
1689  #else
1690  #define __Pyx_CREAL(z) (__real__(z))
1691  #define __Pyx_CIMAG(z) (__imag__(z))
1692  #endif
1693 #else
1694  #define __Pyx_CREAL(z) ((z).real)
1695  #define __Pyx_CIMAG(z) ((z).imag)
1696 #endif
1697 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
1698  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
1699  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
1700  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
1701 #else
1702  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
1703  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
1704 #endif
1705 
1706 /* Arithmetic.proto */
1707 #if CYTHON_CCOMPLEX
1708  #define __Pyx_c_eq_float(a, b) ((a)==(b))
1709  #define __Pyx_c_sum_float(a, b) ((a)+(b))
1710  #define __Pyx_c_diff_float(a, b) ((a)-(b))
1711  #define __Pyx_c_prod_float(a, b) ((a)*(b))
1712  #define __Pyx_c_quot_float(a, b) ((a)/(b))
1713  #define __Pyx_c_neg_float(a) (-(a))
1714  #ifdef __cplusplus
1715  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
1716  #define __Pyx_c_conj_float(z) (::std::conj(z))
1717  #if 1
1718  #define __Pyx_c_abs_float(z) (::std::abs(z))
1719  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
1720  #endif
1721  #else
1722  #define __Pyx_c_is_zero_float(z) ((z)==0)
1723  #define __Pyx_c_conj_float(z) (conjf(z))
1724  #if 1
1725  #define __Pyx_c_abs_float(z) (cabsf(z))
1726  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
1727  #endif
1728  #endif
1729 #else
1730  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
1731  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
1732  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
1733  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
1734  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
1735  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
1736  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
1737  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
1738  #if 1
1739  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
1740  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
1741  #endif
1742 #endif
1743 
1744 /* Arithmetic.proto */
1745 #if CYTHON_CCOMPLEX
1746  #define __Pyx_c_eq_double(a, b) ((a)==(b))
1747  #define __Pyx_c_sum_double(a, b) ((a)+(b))
1748  #define __Pyx_c_diff_double(a, b) ((a)-(b))
1749  #define __Pyx_c_prod_double(a, b) ((a)*(b))
1750  #define __Pyx_c_quot_double(a, b) ((a)/(b))
1751  #define __Pyx_c_neg_double(a) (-(a))
1752  #ifdef __cplusplus
1753  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
1754  #define __Pyx_c_conj_double(z) (::std::conj(z))
1755  #if 1
1756  #define __Pyx_c_abs_double(z) (::std::abs(z))
1757  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
1758  #endif
1759  #else
1760  #define __Pyx_c_is_zero_double(z) ((z)==0)
1761  #define __Pyx_c_conj_double(z) (conj(z))
1762  #if 1
1763  #define __Pyx_c_abs_double(z) (cabs(z))
1764  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
1765  #endif
1766  #endif
1767 #else
1768  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
1769  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
1770  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
1771  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
1772  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
1773  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
1774  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
1775  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
1776  #if 1
1777  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
1778  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
1779  #endif
1780 #endif
1781 
1782 /* CIntToPy.proto */
1783 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1784 
1785 /* CIntToPy.proto */
1786 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
1787 
1788 /* CIntFromPy.proto */
1789 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1790 
1791 /* CIntFromPy.proto */
1792 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1793 
1794 /* FastTypeChecks.proto */
1795 #if CYTHON_COMPILING_IN_CPYTHON
1796 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1797 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1798 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1799 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1800 #else
1801 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1802 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1803 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1804 #endif
1805 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1806 
1807 /* CheckBinaryVersion.proto */
1808 static int __Pyx_check_binary_version(void);
1809 
1810 /* InitStrings.proto */
1811 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1812 
1813 
1814 /* Module declarations from 'cpython.buffer' */
1815 
1816 /* Module declarations from 'libc.string' */
1817 
1818 /* Module declarations from 'libc.stdio' */
1819 
1820 /* Module declarations from '__builtin__' */
1821 
1822 /* Module declarations from 'cpython.type' */
1823 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
1824 
1825 /* Module declarations from 'cpython' */
1826 
1827 /* Module declarations from 'cpython.object' */
1828 
1829 /* Module declarations from 'cpython.ref' */
1830 
1831 /* Module declarations from 'cpython.mem' */
1832 
1833 /* Module declarations from 'numpy' */
1834 
1835 /* Module declarations from 'numpy' */
1836 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
1837 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
1838 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
1839 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
1840 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
1841 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
1842 
1843 /* Module declarations from 'ADR' */
1844 static PyTypeObject *__pyx_ptype_3ADR_ADR = 0;
1845 #define __Pyx_MODULE_NAME "ADR"
1846 extern int __pyx_module_is_main_ADR;
1847 int __pyx_module_is_main_ADR = 0;
1848 
1849 /* Implementation of 'ADR' */
1850 static PyObject *__pyx_builtin_TypeError;
1851 static PyObject *__pyx_builtin_range;
1852 static PyObject *__pyx_builtin_sum;
1853 static PyObject *__pyx_builtin_enumerate;
1854 static PyObject *__pyx_builtin_ValueError;
1855 static PyObject *__pyx_builtin_RuntimeError;
1856 static PyObject *__pyx_builtin_ImportError;
1857 static const char __pyx_k_I[] = "I";
1858 static const char __pyx_k_a[] = "a";
1859 static const char __pyx_k_c[] = "c";
1860 static const char __pyx_k_d[] = "d";
1861 static const char __pyx_k_g[] = "g";
1862 static const char __pyx_k_i[] = "i";
1863 static const char __pyx_k_k[] = "k";
1864 static const char __pyx_k_m[] = "m";
1865 static const char __pyx_k_n[] = "n";
1866 static const char __pyx_k_q[] = "q";
1867 static const char __pyx_k_r[] = "r";
1868 static const char __pyx_k_t[] = "t";
1869 static const char __pyx_k_u[] = "u";
1870 static const char __pyx_k_x[] = "x";
1871 static const char __pyx_k_ci[] = "ci";
1872 static const char __pyx_k_cj[] = "cj";
1873 static const char __pyx_k_ck[] = "ck";
1874 static const char __pyx_k_cq[] = "cq";
1875 static const char __pyx_k_dc[] = "dc";
1876 static const char __pyx_k_df[] = "df";
1877 static const char __pyx_k_nI[] = "nI";
1878 static const char __pyx_k_nc[] = "nc";
1879 static const char __pyx_k_nd[] = "nd";
1880 static const char __pyx_k_sd[] = "sd";
1881 static const char __pyx_k_ua[] = "ua";
1882 static const char __pyx_k_vt[] = "vt";
1883 static const char __pyx_k_ADR[] = "ADR";
1884 static const char __pyx_k_adr[] = "adr";
1885 static const char __pyx_k_cfl[] = "cfl";
1886 static const char __pyx_k_dim[] = "dim";
1887 static const char __pyx_k_doc[] = "__doc__";
1888 static const char __pyx_k_dof[] = "dof";
1889 static const char __pyx_k_ebN[] = "ebN";
1890 static const char __pyx_k_ebq[] = "ebq";
1891 static const char __pyx_k_get[] = "get";
1892 static const char __pyx_k_l2g[] = "l2g";
1893 static const char __pyx_k_lag[] = "lag";
1894 static const char __pyx_k_log[] = "log";
1895 static const char __pyx_k_max[] = "max";
1896 static const char __pyx_k_pdb[] = "pdb";
1897 static const char __pyx_k_phi[] = "phi";
1898 static const char __pyx_k_psi[] = "psi";
1899 static const char __pyx_k_q_a[] = "q_a";
1900 static const char __pyx_k_q_r[] = "q_r";
1901 static const char __pyx_k_q_v[] = "q_v";
1902 static const char __pyx_k_row[] = "row";
1903 static const char __pyx_k_sum[] = "sum";
1904 static const char __pyx_k_u_j[] = "u_j";
1905 static const char __pyx_k_Comm[] = "Comm";
1906 static const char __pyx_k_Hess[] = "Hess";
1907 static const char __pyx_k_aOfX[] = "aOfX";
1908 static const char __pyx_k_cebq[] = "cebq";
1909 static const char __pyx_k_comm[] = "comm";
1910 static const char __pyx_k_copy[] = "copy";
1911 static const char __pyx_k_data[] = "data";
1912 static const char __pyx_k_dphi[] = "dphi";
1913 static const char __pyx_k_ebNE[] = "ebNE";
1914 static const char __pyx_k_ebqe[] = "ebqe";
1915 static const char __pyx_k_fOfX[] = "fOfX";
1916 static const char __pyx_k_fabs[] = "fabs";
1917 static const char __pyx_k_fill[] = "fill";
1918 static const char __pyx_k_flag[] = "flag";
1919 static const char __pyx_k_flat[] = "flat";
1920 static const char __pyx_k_init[] = "__init__";
1921 static const char __pyx_k_keys[] = "keys";
1922 static const char __pyx_k_main[] = "__main__";
1923 static const char __pyx_k_mass[] = "mass";
1924 static const char __pyx_k_math[] = "math";
1925 static const char __pyx_k_mesh[] = "mesh";
1926 static const char __pyx_k_name[] = "name";
1927 static const char __pyx_k_self[] = "self";
1928 static const char __pyx_k_size[] = "size";
1929 static const char __pyx_k_stab[] = "stab";
1930 static const char __pyx_k_step[] = "step";
1931 static const char __pyx_k_stop[] = "stop";
1932 static const char __pyx_k_test[] = "__test__";
1933 static const char __pyx_k_array[] = "array";
1934 static const char __pyx_k_cebqe[] = "cebqe";
1935 static const char __pyx_k_class[] = "__class__";
1936 static const char __pyx_k_dtype[] = "dtype";
1937 static const char __pyx_k_level[] = "level";
1938 static const char __pyx_k_numpy[] = "numpy";
1939 static const char __pyx_k_phi_k[] = "phi_k";
1940 static const char __pyx_k_range[] = "range";
1941 static const char __pyx_k_shape[] = "shape";
1942 static const char __pyx_k_start[] = "start";
1943 static const char __pyx_k_uDict[] = "uDict";
1944 static const char __pyx_k_u_dof[] = "u_dof";
1945 static const char __pyx_k_u_l2g[] = "u_l2g";
1946 static const char __pyx_k_zeros[] = "zeros";
1947 static const char __pyx_k_CT_sge[] = "CT_sge";
1948 static const char __pyx_k_append[] = "append";
1949 static const char __pyx_k_arange[] = "arange";
1950 static const char __pyx_k_dS_ref[] = "dS_ref";
1951 static const char __pyx_k_dV_ref[] = "dV_ref";
1952 static const char __pyx_k_dofMap[] = "dofMap";
1953 static const char __pyx_k_ebqe_a[] = "ebqe_a";
1954 static const char __pyx_k_ebqe_v[] = "ebqe_v";
1955 static const char __pyx_k_grad_u[] = "grad(u)";
1956 static const char __pyx_k_import[] = "__import__";
1957 static const char __pyx_k_l2proj[] = "l2proj";
1958 static const char __pyx_k_linear[] = "linear";
1959 static const char __pyx_k_lowmem[] = "lowmem";
1960 static const char __pyx_k_memory[] = "memory";
1961 static const char __pyx_k_module[] = "__module__";
1962 static const char __pyx_k_nCalls[] = "nCalls";
1963 static const char __pyx_k_nSteps[] = "nSteps";
1964 static const char __pyx_k_name_2[] = "__name__";
1965 static const char __pyx_k_offset[] = "offset";
1966 static const char __pyx_k_phi_ip[] = "phi_ip";
1967 static const char __pyx_k_reduce[] = "__reduce__";
1968 static const char __pyx_k_sdInfo[] = "sdInfo";
1969 static const char __pyx_k_stride[] = "stride";
1970 static const char __pyx_k_values[] = "values";
1971 static const char __pyx_k_TC_base[] = "TC_base";
1972 static const char __pyx_k_default[] = "default";
1973 static const char __pyx_k_has_key[] = "has_key";
1974 static const char __pyx_k_matType[] = "matType";
1975 static const char __pyx_k_numDiff[] = "numDiff";
1976 static const char __pyx_k_options[] = "options";
1977 static const char __pyx_k_outFlow[] = "outFlow";
1978 static const char __pyx_k_penalty[] = "penalty";
1979 static const char __pyx_k_phiDict[] = "phiDict";
1980 static const char __pyx_k_prepare[] = "__prepare__";
1981 static const char __pyx_k_proteus[] = "proteus";
1982 static const char __pyx_k_sc_beta[] = "sc_beta";
1983 static const char __pyx_k_sc_uref[] = "sc_uref";
1984 static const char __pyx_k_setFlow[] = "setFlow";
1985 static const char __pyx_k_Archiver[] = "Archiver";
1986 static const char __pyx_k_Jacobian[] = "Jacobian ";
1987 static const char __pyx_k_SGE_base[] = "SGE_base";
1988 static const char __pyx_k_constant[] = "constant";
1989 static const char __pyx_k_evaluate[] = "evaluate";
1990 static const char __pyx_k_femSpace[] = "femSpace";
1991 static const char __pyx_k_getstate[] = "__getstate__";
1992 static const char __pyx_k_grad_psi[] = "grad_psi";
1993 static const char __pyx_k_jacobian[] = "jacobian";
1994 static const char __pyx_k_logEvent[] = "logEvent";
1995 static const char __pyx_k_mesh_dof[] = "mesh_dof";
1996 static const char __pyx_k_mesh_l2g[] = "mesh_l2g";
1997 static const char __pyx_k_nSpaceIn[] = "nSpaceIn";
1998 static const char __pyx_k_offset_u[] = "offset_u";
1999 static const char __pyx_k_qualname[] = "__qualname__";
2000 static const char __pyx_k_reaction[] = "reaction";
2001 static const char __pyx_k_sc_alpha[] = "sc_alpha";
2002 static const char __pyx_k_setstate[] = "__setstate__";
2003 static const char __pyx_k_stride_u[] = "stride_u";
2004 static const char __pyx_k_timeTerm[] = "timeTerm";
2005 static const char __pyx_k_velocity[] = "velocity";
2006 static const char __pyx_k_Transport[] = "Transport";
2007 static const char __pyx_k_TypeError[] = "TypeError";
2008 static const char __pyx_k_advection[] = "advection";
2009 static const char __pyx_k_diffusion[] = "diffusion";
2010 static const char __pyx_k_eN_global[] = "eN_global";
2011 static const char __pyx_k_enumerate[] = "enumerate";
2012 static const char __pyx_k_fbcObject[] = "fbcObject";
2013 static const char __pyx_k_getValues[] = "getValues";
2014 static const char __pyx_k_globalMax[] = "globalMax";
2015 static const char __pyx_k_globalSum[] = "globalSum";
2016 static const char __pyx_k_iteritems[] = "iteritems";
2017 static const char __pyx_k_metaclass[] = "__metaclass__";
2018 static const char __pyx_k_mixedFlow[] = "mixedFlow";
2019 static const char __pyx_k_nodeArray[] = "nodeArray";
2020 static const char __pyx_k_nonlinear[] = "nonlinear";
2021 static const char __pyx_k_potential[] = "potential";
2022 static const char __pyx_k_psi_trace[] = "psi_trace";
2023 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2024 static const char __pyx_k_testSpace[] = "testSpace";
2025 static const char __pyx_k_LevelModel[] = "LevelModel";
2026 static const char __pyx_k_Quadrature[] = "Quadrature";
2027 static const char __pyx_k_ValueError[] = "ValueError";
2028 static const char __pyx_k_XdmfWriter[] = "XdmfWriter";
2029 static const char __pyx_k_buildUnion[] = "buildUnion";
2030 static const char __pyx_k_components[] = "components";
2031 static const char __pyx_k_ebq_global[] = "ebq_global";
2032 static const char __pyx_k_inflowFlux[] = "inflowFlux";
2033 static const char __pyx_k_normal_ref[] = "normal_ref";
2034 static const char __pyx_k_tLast_mesh[] = "tLast_mesh";
2035 static const char __pyx_k_u_test_ref[] = "u_test_ref";
2036 static const char __pyx_k_useMetrics[] = "useMetrics";
2037 static const char __pyx_k_ImportError[] = "ImportError";
2038 static const char __pyx_k_cebq_global[] = "cebq_global";
2039 static const char __pyx_k_defaultName[] = "defaultName";
2040 static const char __pyx_k_ebN_element[] = "ebN_element";
2041 static const char __pyx_k_elementMaps[] = "elementMaps";
2042 static const char __pyx_k_estimate_mt[] = "estimate_mt";
2043 static const char __pyx_k_getJacobian[] = "getJacobian";
2044 static const char __pyx_k_getResidual[] = "getResidual";
2045 static const char __pyx_k_hamiltonian[] = "hamiltonian";
2046 static const char __pyx_k_massLumping[] = "massLumping";
2047 static const char __pyx_k_q_numDiff_u[] = "q_numDiff_u";
2048 static const char __pyx_k_setUnknowns[] = "setUnknowns";
2049 static const char __pyx_k_testIsTrial[] = "testIsTrial";
2050 static const char __pyx_k_u_trial_ref[] = "u_trial_ref";
2051 static const char __pyx_k_Coefficients[] = "Coefficients";
2052 static const char __pyx_k_RuntimeError[] = "RuntimeError";
2053 static const char __pyx_k_SubgridError[] = "SubgridError";
2054 static const char __pyx_k_coefficients[] = "coefficients";
2055 static const char __pyx_k_ebqe_penalty[] = "ebqe_penalty";
2056 static const char __pyx_k_movingDomain[] = "movingDomain";
2057 static const char __pyx_k_numDiff_last[] = "numDiff_last";
2058 static const char __pyx_k_proteus_Comm[] = "proteus.Comm";
2059 static const char __pyx_k_MOVING_DOMAIN[] = "MOVING_DOMAIN";
2060 static const char __pyx_k_NumericalFlux[] = "NumericalFlux";
2061 static const char __pyx_k_adjoint_sigma[] = "adjoint_sigma";
2062 static const char __pyx_k_cfemIntegrals[] = "cfemIntegrals";
2063 static const char __pyx_k_csrRowIndeces[] = "csrRowIndeces";
2064 static const char __pyx_k_diffusionDict[] = "diffusionDict";
2065 static const char __pyx_k_ebqe_bc_u_ext[] = "ebqe_bc_u_ext";
2066 static const char __pyx_k_internalNodes[] = "internalNodes";
2067 static const char __pyx_k_isDOFBoundary[] = "isDOFBoundary";
2068 static const char __pyx_k_nNodes_global[] = "nNodes_global";
2069 static const char __pyx_k_nSpace_global[] = "nSpace_global";
2070 static const char __pyx_k_nStepsToDelay[] = "nStepsToDelay";
2071 static const char __pyx_k_nVDOF_element[] = "nVDOF_element";
2072 static const char __pyx_k_numericalFlux[] = "numericalFlux";
2073 static const char __pyx_k_penalty_power[] = "penalty_power";
2074 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2075 static const char __pyx_k_stabilization[] = "stabilization";
2076 static const char __pyx_k_stride_offset[] = "stride+offset";
2077 static const char __pyx_k_testSpaceDict[] = "testSpaceDict";
2078 static const char __pyx_k_variableNames[] = "variableNames";
2079 static const char __pyx_k_CompKernelFlag[] = "CompKernelFlag";
2080 static const char __pyx_k_ShockCapturing[] = "ShockCapturing";
2081 static const char __pyx_k_compKernelFlag[] = "compKernelFlag";
2082 static const char __pyx_k_elemQuadIsDict[] = "elemQuadIsDict";
2083 static const char __pyx_k_globalJacobian[] = "globalJacobian";
2084 static const char __pyx_k_globalResidual[] = "globalResidual";
2085 static const char __pyx_k_grad_psi_trace[] = "grad_psi_trace";
2086 static const char __pyx_k_initializeMesh[] = "initializeMesh";
2087 static const char __pyx_k_mesh_trial_ref[] = "mesh_trial_ref";
2088 static const char __pyx_k_nNodes_element[] = "nNodes_element";
2089 static const char __pyx_k_setFromOptions[] = "setFromOptions";
2090 static const char __pyx_k_shockCapturing[] = "shockCapturing";
2091 static const char __pyx_k_Global_residual[] = "Global residual";
2092 static const char __pyx_k_TimeIntegration[] = "TimeIntegration";
2093 static const char __pyx_k_boundaryJac_ref[] = "boundaryJac_ref";
2094 static const char __pyx_k_boundaryNormals[] = "boundaryNormals";
2095 static const char __pyx_k_elementDiameter[] = "elementDiameter";
2096 static const char __pyx_k_isDOFBoundary_u[] = "isDOFBoundary_u";
2097 static const char __pyx_k_nElements_owned[] = "nElements_owned";
2098 static const char __pyx_k_nFreeDOF_global[] = "nFreeDOF_global";
2099 static const char __pyx_k_nNodes_internal[] = "nNodes_internal";
2100 static const char __pyx_k_phiTrialIsTrial[] = "phiTrialIsTrial";
2101 static const char __pyx_k_proteus_ADR_pyx[] = "proteus/ADR.pyx";
2102 static const char __pyx_k_reactionLumping[] = "reactionLumping";
2103 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2104 static const char __pyx_k_timeIntegration[] = "timeIntegration";
2105 static const char __pyx_k_u_grad_test_ref[] = "u_grad_test_ref";
2106 static const char __pyx_k_advectiveFlux_bc[] = "advectiveFlux_bc";
2107 static const char __pyx_k_conservativeFlux[] = "conservativeFlux";
2108 static const char __pyx_k_csrColumnOffsets[] = "csrColumnOffsets";
2109 static const char __pyx_k_diffusiveFlux_bc[] = "diffusiveFlux_bc";
2110 static const char __pyx_k_inflowBoundaryBC[] = "inflowBoundaryBC";
2111 static const char __pyx_k_isFluxBoundary_u[] = "isFluxBoundary_u";
2112 static const char __pyx_k_max_nDOF_element[] = "max_nDOF_element";
2113 static const char __pyx_k_nElements_global[] = "nElements_global";
2114 static const char __pyx_k_nFreeVDOF_global[] = "nFreeVDOF_global";
2115 static const char __pyx_k_n_phi_ip_element[] = "n_phi_ip_element";
2116 static const char __pyx_k_penalty_constant[] = "penalty_constant";
2117 static const char __pyx_k_proteus_FemTools[] = "proteus.FemTools";
2118 static const char __pyx_k_q_numDiff_u_last[] = "q_numDiff_u_last";
2119 static const char __pyx_k_u_grad_trial_ref[] = "u_grad_trial_ref";
2120 static const char __pyx_k_u_test_trace_ref[] = "u_test_trace_ref";
2121 static const char __pyx_k_zeroJacobian_CSR[] = "zeroJacobian_CSR";
2122 static const char __pyx_k_L2projectEvaluate[] = "L2projectEvaluate";
2123 static const char __pyx_k_LevelModel___init[] = "LevelModel.__init__";
2124 static const char __pyx_k_NonlinearEquation[] = "NonlinearEquation";
2125 static const char __pyx_k_OneLevelTransport[] = "OneLevelTransport";
2126 static const char __pyx_k_VOF_max_numDiff_e[] = "VOF: max numDiff %e";
2127 static const char __pyx_k_boundaryJacobians[] = "boundaryJacobians";
2128 static const char __pyx_k_calculateJacobian[] = "calculateJacobian";
2129 static const char __pyx_k_calculateResidual[] = "calculateResidual";
2130 static const char __pyx_k_csrRowIndeces_u_u[] = "csrRowIndeces_u_u";
2131 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
2132 static const char __pyx_k_elementQuadrature[] = "elementQuadrature";
2133 static const char __pyx_k_getBasisValuesRef[] = "getBasisValuesRef";
2134 static const char __pyx_k_nDOF_test_element[] = "nDOF_test_element";
2135 static const char __pyx_k_nQuadraturePoints[] = "nQuadraturePoints";
2136 static const char __pyx_k_nodeVelocityArray[] = "nodeVelocityArray";
2137 static const char __pyx_k_numericalFluxType[] = "numericalFluxType";
2138 static const char __pyx_k_proteus_Profiling[] = "proteus.Profiling";
2139 static const char __pyx_k_proteus_Transport[] = "proteus.Transport";
2140 static const char __pyx_k_sdInfo_u_u_colind[] = "sdInfo_u_u_colind";
2141 static const char __pyx_k_sdInfo_u_u_rowptr[] = "sdInfo_u_u_rowptr";
2142 static const char __pyx_k_setupFieldStrides[] = "setupFieldStrides";
2143 static const char __pyx_k_u_trial_trace_ref[] = "u_trial_trace_ref";
2144 static const char __pyx_k_NumericalFlux_IIPG[] = "NumericalFlux_IIPG";
2145 static const char __pyx_k_NumericalFlux_NIPG[] = "NumericalFlux_NIPG";
2146 static const char __pyx_k_NumericalFlux_SIPG[] = "NumericalFlux_SIPG";
2147 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2148 static const char __pyx_k_ebqe_bc_flux_u_ext[] = "ebqe_bc_flux_u_ext";
2149 static const char __pyx_k_internalNodesArray[] = "internalNodesArray";
2150 static const char __pyx_k_lag_shockCapturing[] = "lag_shockCapturing";
2151 static const char __pyx_k_localFunctionSpace[] = "localFunctionSpace";
2152 static const char __pyx_k_nDOF_trial_element[] = "nDOF_trial_element";
2153 static const char __pyx_k_setDirichletValues[] = "setDirichletValues";
2154 static const char __pyx_k_updateLocal2Global[] = "updateLocal2Global";
2155 static const char __pyx_k_useSparseDiffusion[] = "useSparseDiffusion";
2156 static const char __pyx_k_Coefficients___init[] = "Coefficients.__init__";
2157 static const char __pyx_k_PostProcessingTools[] = "PostProcessingTools";
2158 static const char __pyx_k_ShockCapturing_base[] = "ShockCapturing_base";
2159 static const char __pyx_k_SubgridError___init[] = "SubgridError.__init__";
2160 static const char __pyx_k_calculateQuadrature[] = "calculateQuadrature";
2161 static const char __pyx_k_csrColumnOffsets_eb[] = "csrColumnOffsets_eb";
2162 static const char __pyx_k_dirichletConditions[] = "dirichletConditions";
2163 static const char __pyx_k_elementIntegralKeys[] = "elementIntegralKeys";
2164 static const char __pyx_k_initializationPhase[] = "initializationPhase";
2165 static const char __pyx_k_mesh_grad_trial_ref[] = "mesh_grad_trial_ref";
2166 static const char __pyx_k_nDOF_test_elementIn[] = "nDOF_test_elementIn";
2167 static const char __pyx_k_nNonzerosInJacobian[] = "nNonzerosInJacobian";
2168 static const char __pyx_k_TimeIntegrationClass[] = "TimeIntegrationClass";
2169 static const char __pyx_k_conservativeFluxDict[] = "conservativeFluxDict";
2170 static const char __pyx_k_csrColumnOffsets_u_u[] = "csrColumnOffsets_u_u";
2171 static const char __pyx_k_dirichletNodeSetList[] = "dirichletNodeSetList";
2172 static const char __pyx_k_forceStrongDirichlet[] = "forceStrongDirichlet";
2173 static const char __pyx_k_getCSRrepresentation[] = "getCSRrepresentation";
2174 static const char __pyx_k_mesh_trial_trace_ref[] = "mesh_trial_trace_ref";
2175 static const char __pyx_k_nDOF_trial_elementIn[] = "nDOF_trial_elementIn";
2176 static const char __pyx_k_proteus_SubgridError[] = "proteus.SubgridError";
2177 static const char __pyx_k_shockCapturingFactor[] = "shockCapturingFactor";
2178 static const char __pyx_k_Coefficients_evaluate[] = "Coefficients.evaluate";
2179 static const char __pyx_k_DOFBoundaryConditions[] = "DOFBoundaryConditions";
2180 static const char __pyx_k_ShockCapturing___init[] = "ShockCapturing.__init__";
2181 static const char __pyx_k_advectiveFlux_bc_flag[] = "advectiveFlux_bc_flag";
2182 static const char __pyx_k_boundaryAdjoint_sigma[] = "boundaryAdjoint_sigma";
2183 static const char __pyx_k_calculateCoefficients[] = "calculateCoefficients";
2184 static const char __pyx_k_calculateSubgridError[] = "calculateSubgridError";
2185 static const char __pyx_k_diffusiveFlux_bc_flag[] = "diffusiveFlux_bc_flag";
2186 static const char __pyx_k_elementDiametersArray[] = "elementDiametersArray";
2187 static const char __pyx_k_elementQuadratureDict[] = "elementQuadratureDict";
2188 static const char __pyx_k_forceStrongConditions[] = "forceStrongConditions";
2189 static const char __pyx_k_massConservationError[] = "massConservationError";
2190 static const char __pyx_k_u_grad_test_trace_ref[] = "u_grad_test_trace_ref";
2191 static const char __pyx_k_velocityPostProcessor[] = "velocityPostProcessor";
2192 static const char __pyx_k_FluxBoundaryConditions[] = "FluxBoundaryConditions";
2193 static const char __pyx_k_LevelModel_estimate_mt[] = "LevelModel.estimate_mt";
2194 static const char __pyx_k_LevelModel_getJacobian[] = "LevelModel.getJacobian";
2195 static const char __pyx_k_LevelModel_getResidual[] = "LevelModel.getResidual";
2196 static const char __pyx_k_fluxBoundaryConditions[] = "fluxBoundaryConditions";
2197 static const char __pyx_k_getBasisValuesTraceRef[] = "getBasisValuesTraceRef";
2198 static const char __pyx_k_nDOF_phi_trial_element[] = "nDOF_phi_trial_element";
2199 static const char __pyx_k_proteus_ShockCapturing[] = "proteus.ShockCapturing";
2200 static const char __pyx_k_referenceFiniteElement[] = "referenceFiniteElement";
2201 static const char __pyx_k_sparseDiffusionTensors[] = "sparseDiffusionTensors";
2202 static const char __pyx_k_u_grad_trial_trace_ref[] = "u_grad_trial_trace_ref";
2203 static const char __pyx_k_velocity_postprocessor[] = "velocity postprocessor";
2204 static const char __pyx_k_Mass_Conservation_Error[] = " Mass Conservation Error";
2205 static const char __pyx_k_csrColumnOffsets_eb_u_u[] = "csrColumnOffsets_eb_u_u";
2206 static const char __pyx_k_elementQuadraturePoints[] = "elementQuadraturePoints";
2207 static const char __pyx_k_inflowBoundaryBC_values[] = "inflowBoundaryBC_values";
2208 static const char __pyx_k_interpolationConditions[] = "interpolationConditions";
2209 static const char __pyx_k_shockCapturingDiffusion[] = "shockCapturingDiffusion";
2210 static const char __pyx_k_timeVaryingCoefficients[] = "timeVaryingCoefficients";
2211 static const char __pyx_k_weakDirichletConditions[] = "weakDirichletConditions";
2212 static const char __pyx_k_SimplexLobattoQuadrature[] = "SimplexLobattoQuadrature";
2213 static const char __pyx_k_elementBoundaryIntegrals[] = "elementBoundaryIntegrals";
2214 static const char __pyx_k_elementQuadratureWeights[] = "elementQuadratureWeights";
2215 static const char __pyx_k_nQuadraturePoints_global[] = "nQuadraturePoints_global";
2216 static const char __pyx_k_proteus_NonlinearSolvers[] = "proteus.NonlinearSolvers";
2217 static const char __pyx_k_stabilizationIsNonlinear[] = "stabilizationIsNonlinear";
2218 static const char __pyx_k_NumericalFlux_IIPG___init[] = "NumericalFlux_IIPG.__init__";
2219 static const char __pyx_k_NumericalFlux_NIPG___init[] = "NumericalFlux_NIPG.__init__";
2220 static const char __pyx_k_NumericalFlux_SIPG___init[] = "NumericalFlux_SIPG.__init__";
2221 static const char __pyx_k_dofBoundaryConditionsDict[] = "dofBoundaryConditionsDict";
2222 static const char __pyx_k_elementBoundaryQuadrature[] = "elementBoundaryQuadrature";
2223 static const char __pyx_k_getBasisGradientValuesRef[] = "getBasisGradientValuesRef";
2224 static const char __pyx_k_initializeTimeIntegration[] = "initializeTimeIntegration";
2225 static const char __pyx_k_isAdvectiveFluxBoundary_u[] = "isAdvectiveFluxBoundary_u";
2226 static const char __pyx_k_mesh_grad_trial_trace_ref[] = "mesh_grad_trial_trace_ref";
2227 static const char __pyx_k_nDOF_mesh_trial_elementIn[] = "nDOF_mesh_trial_elementIn";
2228 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
2229 static const char __pyx_k_nQuadraturePoints_element[] = "nQuadraturePoints_element";
2230 static const char __pyx_k_updateSubgridErrorHistory[] = "updateSubgridErrorHistory";
2231 static const char __pyx_k_usesGradientStabilization[] = "usesGradientStabilization";
2232 static const char __pyx_k_calculateElementQuadrature[] = "calculateElementQuadrature";
2233 static const char __pyx_k_elementInnerDiametersArray[] = "elementInnerDiametersArray";
2234 static const char __pyx_k_fluxBoundaryConditionsDict[] = "fluxBoundaryConditionsDict";
2235 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
2236 static const char __pyx_k_useWeakDirichletConditions[] = "useWeakDirichletConditions";
2237 static const char __pyx_k_dirichletConditionsForceDOF[] = "dirichletConditionsForceDOF";
2238 static const char __pyx_k_ebqe_bc_advectiveFlux_u_ext[] = "ebqe_bc_advectiveFlux_u_ext";
2239 static const char __pyx_k_elementBoundaryIntegralKeys[] = "elementBoundaryIntegralKeys";
2240 static const char __pyx_k_initializeElementQuadrature[] = "initializeElementQuadrature";
2241 static const char __pyx_k_nQuadraturePoints_elementIn[] = "nQuadraturePoints_elementIn";
2242 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
2243 static const char __pyx_k_periodicDirichletConditions[] = "periodicDirichletConditions";
2244 static const char __pyx_k_reuse_test_trial_quadrature[] = "reuse_test_trial_quadrature";
2245 static const char __pyx_k_updateShockCapturingHistory[] = "updateShockCapturingHistory";
2246 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
2247 static const char __pyx_k_elementQuadratureRuleIndeces[] = "elementQuadratureRuleIndeces";
2248 static const char __pyx_k_getValuesGlobalExteriorTrace[] = "getValuesGlobalExteriorTrace";
2249 static const char __pyx_k_integrateInterpolationPoints[] = "integrateInterpolationPoints";
2250 static const char __pyx_k_VelocityPostProcessingChooser[] = "VelocityPostProcessingChooser";
2251 static const char __pyx_k_calculateSolutionAtQuadrature[] = "calculateSolutionAtQuadrature";
2252 static const char __pyx_k_elementBoundaryDiametersArray[] = "elementBoundaryDiametersArray";
2253 static const char __pyx_k_elementBoundaryQuadratureDict[] = "elementBoundaryQuadratureDict";
2254 static const char __pyx_k_proteus_TransportCoefficients[] = "proteus.TransportCoefficients";
2255 static const char __pyx_k_Residual_based_shock_capturing[] = "\n Residual-based shock capturing for ADR equations\n\n .. inheritance-diagram:: ShockCapturing\n :parts: 2\n ";
2256 static const char __pyx_k_SubgridError_approximation_for[] = "\n SubgridError approximation for ADR equations\n\n .. inheritance-diagram:: SubgridError\n :parts: 2\n ";
2257 static const char __pyx_k_elementEffectiveDiametersArray[] = "elementEffectiveDiametersArray";
2258 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
2259 static const char __pyx_k_getBasisGradientValuesTraceRef[] = "getBasisGradientValuesTraceRef";
2260 static const char __pyx_k_getPointwiseBoundaryConditions[] = "getPointwiseBoundaryConditions";
2261 static const char __pyx_k_nonlinear_function_evaluations[] = "nonlinear_function_evaluations";
2262 static const char __pyx_k_proteus_ctransportCoefficients[] = "proteus.ctransportCoefficients";
2263 static const char __pyx_k_An_optimized_Advection_Diffusio[] = "\nAn optimized Advection-Diffusion-Reaction module\n";
2264 static const char __pyx_k_Coefficients_of_linear_ADR_equa[] = "\n Coefficients of linear ADR equations\n\n .. inheritance-diagram:: Coefficients\n :parts: 2\n ";
2265 static const char __pyx_k_Optimized_LevelModel_for_ADR_eq[] = "\n Optimized LevelModel for ADR equations\n\n .. inheritance-diagram:: LevelModel\n :parts: 2\n ";
2266 static const char __pyx_k_dofBoundaryConditionsSetterDict[] = "dofBoundaryConditionsSetterDict";
2267 static const char __pyx_k_elementBoundaryQuadraturePoints[] = "elementBoundaryQuadraturePoints";
2268 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2269 static const char __pyx_k_reuse_trial_and_test_quadrature[] = "reuse_trial_and_test_quadrature";
2270 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
2271 static const char __pyx_k_ADR_ShockCapturing_lagging_reque[] = "ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying";
2272 static const char __pyx_k_ADR_ShockCapturing_switched_to_l[] = "ADR.ShockCapturing: switched to lagged shock capturing";
2273 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi[] = "Advection_DiagonalUpwind_Diffusion_IIPG_exterior";
2274 static const char __pyx_k_Building_time_integration_object[] = "Building time integration object";
2275 static const char __pyx_k_C0_AffineLinearOnSimplexWithNoda[] = "C0_AffineLinearOnSimplexWithNodalBasis";
2276 static const char __pyx_k_Calculating_numerical_quadrature[] = "Calculating numerical quadrature formulas";
2277 static const char __pyx_k_Coefficients_initializeElementBo[] = "Coefficients.initializeElementBoundaryQuadrature";
2278 static const char __pyx_k_Coefficients_initializeElementQu[] = "Coefficients.initializeElementQuadrature";
2279 static const char __pyx_k_Coefficients_initializeGlobalExt[] = "Coefficients.initializeGlobalExteriorElementBoundaryQuadrature";
2280 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
2281 static const char __pyx_k_LevelModel_calculateAuxiliaryQua[] = "LevelModel.calculateAuxiliaryQuantitiesAfterStep";
2282 static const char __pyx_k_LevelModel_calculateCoefficients[] = "LevelModel.calculateCoefficients";
2283 static const char __pyx_k_LevelModel_calculateElementBound[] = "LevelModel.calculateElementBoundaryQuadrature";
2284 static const char __pyx_k_LevelModel_calculateElementQuadr[] = "LevelModel.calculateElementQuadrature";
2285 static const char __pyx_k_LevelModel_calculateExteriorElem[] = "LevelModel.calculateExteriorElementBoundaryQuadrature";
2286 static const char __pyx_k_LevelModel_calculateSolutionAtQu[] = "LevelModel.calculateSolutionAtQuadrature";
2287 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2288 static const char __pyx_k_ShockCapturing_initializeElement[] = "ShockCapturing.initializeElementQuadrature";
2289 static const char __pyx_k_ShockCapturing_updateShockCaptur[] = "ShockCapturing.updateShockCapturingHistory";
2290 static const char __pyx_k_SubgridError_calculateSubgridErr[] = "SubgridError.calculateSubgridError";
2291 static const char __pyx_k_SubgridError_initializeElementQu[] = "SubgridError.initializeElementQuadrature";
2292 static const char __pyx_k_SubgridError_updateSubgridErrorH[] = "SubgridError.updateSubgridErrorHistory";
2293 static const char __pyx_k_Updating_local_to_global_mapping[] = "Updating local to global mappings";
2294 static const char __pyx_k_You_must_use_a_numerical_flux_to[] = "You must use a numerical flux to apply weak boundary conditions for parallel runs";
2295 static const char __pyx_k_advectiveFluxBoundaryConditionsD[] = "advectiveFluxBoundaryConditionsDict";
2296 static const char __pyx_k_advectiveFluxBoundaryConditionsS[] = "advectiveFluxBoundaryConditionsSetterDict";
2297 static const char __pyx_k_calculateAuxiliaryQuantitiesAfte[] = "calculateAuxiliaryQuantitiesAfterStep";
2298 static const char __pyx_k_calculateElementBoundaryQuadratu[] = "calculateElementBoundaryQuadrature";
2299 static const char __pyx_k_calculateExteriorElementBoundary[] = "calculateExteriorElementBoundaryQuadrature";
2300 static const char __pyx_k_diffusiveFluxBoundaryConditionsD[] = "diffusiveFluxBoundaryConditionsDictDict";
2301 static const char __pyx_k_diffusiveFluxBoundaryConditionsS[] = "diffusiveFluxBoundaryConditionsSetterDictDict";
2302 static const char __pyx_k_elementBoundaryLocalElementBound[] = "elementBoundaryLocalElementBoundariesArray";
2303 static const char __pyx_k_elementBoundaryQuadratureDiction[] = "elementBoundaryQuadratureDictionaryWriter";
2304 static const char __pyx_k_elementBoundaryQuadratureRuleInd[] = "elementBoundaryQuadratureRuleIndeces";
2305 static const char __pyx_k_elementBoundaryQuadratureWeights[] = "elementBoundaryQuadratureWeights";
2306 static const char __pyx_k_elementQuadratureDictionaryWrite[] = "elementQuadratureDictionaryWriter";
2307 static const char __pyx_k_element_and_element_boundary_Jac[] = "element and element boundary Jacobians";
2308 static const char __pyx_k_exteriorElementBoundaryQuadratur[] = "exteriorElementBoundaryQuadratureDictionaryWriter";
2309 static const char __pyx_k_fluxBoundaryConditionsObjectsDic[] = "fluxBoundaryConditionsObjectsDict";
2310 static const char __pyx_k_getAdvectiveFluxBoundaryConditio[] = "getAdvectiveFluxBoundaryConditions";
2311 static const char __pyx_k_getDiffusiveFluxBoundaryConditio[] = "getDiffusiveFluxBoundaryConditions";
2312 static const char __pyx_k_inflowBC_internalNodes_updateLoc[] = "inflowBC, internalNodes,updateLocal2Global";
2313 static const char __pyx_k_initializeElementBoundaryQuadrat[] = "initializeElementBoundaryQuadrature";
2314 static const char __pyx_k_initializeGlobalExteriorElementB[] = "initializeGlobalExteriorElementBoundaryQuadrature";
2315 static const char __pyx_k_nElementBoundaryQuadraturePoints[] = "nElementBoundaryQuadraturePoints_elementBoundary";
2316 static const char __pyx_k_nExteriorElementBoundaries_globa[] = "nExteriorElementBoundaries_global";
2317 static const char __pyx_k_nQuadraturePoints_elementBoundar[] = "nQuadraturePoints_elementBoundaryIn";
2318 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2319 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2320 static const char __pyx_k_nonlinear_function_jacobian_eval[] = "nonlinear_function_jacobian_evaluations";
2321 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2322 static const char __pyx_k_points_elementBoundaryQuadrature[] = "points_elementBoundaryQuadrature";
2323 static const char __pyx_k_scalars_elementBoundaryQuadratur[] = "scalars_elementBoundaryQuadrature";
2324 static const char __pyx_k_stressTraceBoundaryConditionsSet[] = "stressTraceBoundaryConditionsSetterDict";
2325 static const char __pyx_k_tensors_elementBoundaryQuadratur[] = "tensors_elementBoundaryQuadrature";
2326 static const char __pyx_k_to_reuse_test_trial_quad_all_fem[] = "to reuse_test_trial_quad all femSpaces must be the same!";
2327 static const char __pyx_k_vectors_elementBoundaryQuadratur[] = "vectors_elementBoundaryQuadrature";
2328 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi_2[] = "Advection_DiagonalUpwind_Diffusion_SIPG_exterior";
2329 static const char __pyx_k_Advection_DiagonalUpwind_Diffusi_3[] = "Advection_DiagonalUpwind_Diffusion_NIPG_exterior";
2330 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2331 static const char __pyx_k_diffusiveFluxBoundaryConditionsD_2[] = "diffusiveFluxBoundaryConditionsDict";
2332 static const char __pyx_k_nElementBoundaryQuadraturePoints_2[] = "nElementBoundaryQuadraturePoints_global";
2333 static PyObject *__pyx_n_s_ADR;
2334 static PyObject *__pyx_kp_s_ADR_ShockCapturing_lagging_reque;
2335 static PyObject *__pyx_kp_s_ADR_ShockCapturing_switched_to_l;
2336 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi;
2337 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi_2;
2338 static PyObject *__pyx_n_s_Advection_DiagonalUpwind_Diffusi_3;
2339 static PyObject *__pyx_n_s_Archiver;
2340 static PyObject *__pyx_kp_s_Building_time_integration_object;
2341 static PyObject *__pyx_n_s_C0_AffineLinearOnSimplexWithNoda;
2342 static PyObject *__pyx_n_s_CT_sge;
2343 static PyObject *__pyx_kp_s_Calculating_numerical_quadrature;
2344 static PyObject *__pyx_n_s_Coefficients;
2345 static PyObject *__pyx_n_s_Coefficients___init;
2346 static PyObject *__pyx_n_s_Coefficients_evaluate;
2347 static PyObject *__pyx_n_s_Coefficients_initializeElementBo;
2348 static PyObject *__pyx_n_s_Coefficients_initializeElementQu;
2349 static PyObject *__pyx_n_s_Coefficients_initializeGlobalExt;
2350 static PyObject *__pyx_kp_s_Coefficients_of_linear_ADR_equa;
2351 static PyObject *__pyx_n_s_Comm;
2352 static PyObject *__pyx_n_s_CompKernelFlag;
2353 static PyObject *__pyx_n_s_DOFBoundaryConditions;
2354 static PyObject *__pyx_n_s_FluxBoundaryConditions;
2355 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2356 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2357 static PyObject *__pyx_kp_s_Global_residual;
2358 static PyObject *__pyx_n_s_Hess;
2359 static PyObject *__pyx_n_s_I;
2360 static PyObject *__pyx_n_s_ImportError;
2361 static PyObject *__pyx_kp_s_Jacobian;
2362 static PyObject *__pyx_n_s_L2projectEvaluate;
2363 static PyObject *__pyx_n_s_LevelModel;
2364 static PyObject *__pyx_n_s_LevelModel___init;
2365 static PyObject *__pyx_n_s_LevelModel_calculateAuxiliaryQua;
2366 static PyObject *__pyx_n_s_LevelModel_calculateCoefficients;
2367 static PyObject *__pyx_n_s_LevelModel_calculateElementBound;
2368 static PyObject *__pyx_n_s_LevelModel_calculateElementQuadr;
2369 static PyObject *__pyx_n_s_LevelModel_calculateExteriorElem;
2370 static PyObject *__pyx_n_s_LevelModel_calculateSolutionAtQu;
2371 static PyObject *__pyx_n_s_LevelModel_estimate_mt;
2372 static PyObject *__pyx_n_s_LevelModel_getJacobian;
2373 static PyObject *__pyx_n_s_LevelModel_getResidual;
2374 static PyObject *__pyx_n_s_MOVING_DOMAIN;
2375 static PyObject *__pyx_kp_s_Mass_Conservation_Error;
2376 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2377 static PyObject *__pyx_n_s_NonlinearEquation;
2378 static PyObject *__pyx_n_s_NumericalFlux;
2379 static PyObject *__pyx_n_s_NumericalFlux_IIPG;
2380 static PyObject *__pyx_n_s_NumericalFlux_IIPG___init;
2381 static PyObject *__pyx_n_s_NumericalFlux_NIPG;
2382 static PyObject *__pyx_n_s_NumericalFlux_NIPG___init;
2383 static PyObject *__pyx_n_s_NumericalFlux_SIPG;
2384 static PyObject *__pyx_n_s_NumericalFlux_SIPG___init;
2385 static PyObject *__pyx_n_s_OneLevelTransport;
2386 static PyObject *__pyx_kp_s_Optimized_LevelModel_for_ADR_eq;
2387 static PyObject *__pyx_n_s_PostProcessingTools;
2388 static PyObject *__pyx_n_s_Quadrature;
2389 static PyObject *__pyx_kp_s_Residual_based_shock_capturing;
2390 static PyObject *__pyx_n_s_RuntimeError;
2391 static PyObject *__pyx_n_s_SGE_base;
2392 static PyObject *__pyx_n_s_ShockCapturing;
2393 static PyObject *__pyx_n_s_ShockCapturing___init;
2394 static PyObject *__pyx_n_s_ShockCapturing_base;
2395 static PyObject *__pyx_n_s_ShockCapturing_initializeElement;
2396 static PyObject *__pyx_n_s_ShockCapturing_updateShockCaptur;
2397 static PyObject *__pyx_n_s_SimplexLobattoQuadrature;
2398 static PyObject *__pyx_n_s_SubgridError;
2399 static PyObject *__pyx_n_s_SubgridError___init;
2400 static PyObject *__pyx_kp_s_SubgridError_approximation_for;
2401 static PyObject *__pyx_n_s_SubgridError_calculateSubgridErr;
2402 static PyObject *__pyx_n_s_SubgridError_initializeElementQu;
2403 static PyObject *__pyx_n_s_SubgridError_updateSubgridErrorH;
2404 static PyObject *__pyx_n_s_TC_base;
2405 static PyObject *__pyx_n_s_TimeIntegration;
2406 static PyObject *__pyx_n_s_TimeIntegrationClass;
2407 static PyObject *__pyx_n_s_Transport;
2408 static PyObject *__pyx_n_s_TypeError;
2409 static PyObject *__pyx_kp_s_Updating_local_to_global_mapping;
2410 static PyObject *__pyx_kp_s_VOF_max_numDiff_e;
2411 static PyObject *__pyx_n_s_ValueError;
2412 static PyObject *__pyx_n_s_VelocityPostProcessingChooser;
2413 static PyObject *__pyx_n_s_XdmfWriter;
2414 static PyObject *__pyx_kp_s_You_must_use_a_numerical_flux_to;
2415 static PyObject *__pyx_n_s_a;
2416 static PyObject *__pyx_n_s_aOfX;
2417 static PyObject *__pyx_n_s_adjoint_sigma;
2418 static PyObject *__pyx_n_s_adr;
2419 static PyObject *__pyx_n_s_advection;
2420 static PyObject *__pyx_n_s_advectiveFluxBoundaryConditionsD;
2421 static PyObject *__pyx_n_s_advectiveFluxBoundaryConditionsS;
2422 static PyObject *__pyx_n_s_advectiveFlux_bc;
2423 static PyObject *__pyx_n_s_advectiveFlux_bc_flag;
2424 static PyObject *__pyx_n_s_append;
2425 static PyObject *__pyx_n_s_arange;
2426 static PyObject *__pyx_n_s_array;
2427 static PyObject *__pyx_n_s_boundaryAdjoint_sigma;
2428 static PyObject *__pyx_n_s_boundaryJac_ref;
2429 static PyObject *__pyx_n_s_boundaryJacobians;
2430 static PyObject *__pyx_n_s_boundaryNormals;
2431 static PyObject *__pyx_n_s_buildUnion;
2432 static PyObject *__pyx_n_s_c;
2433 static PyObject *__pyx_n_s_calculateAuxiliaryQuantitiesAfte;
2434 static PyObject *__pyx_n_s_calculateCoefficients;
2435 static PyObject *__pyx_n_s_calculateElementBoundaryQuadratu;
2436 static PyObject *__pyx_n_s_calculateElementQuadrature;
2437 static PyObject *__pyx_n_s_calculateExteriorElementBoundary;
2438 static PyObject *__pyx_n_s_calculateJacobian;
2439 static PyObject *__pyx_n_s_calculateQuadrature;
2440 static PyObject *__pyx_n_s_calculateResidual;
2441 static PyObject *__pyx_n_s_calculateSolutionAtQuadrature;
2442 static PyObject *__pyx_n_s_calculateSubgridError;
2443 static PyObject *__pyx_n_s_cebq;
2444 static PyObject *__pyx_n_s_cebq_global;
2445 static PyObject *__pyx_n_s_cebqe;
2446 static PyObject *__pyx_n_s_cfemIntegrals;
2447 static PyObject *__pyx_n_s_cfl;
2448 static PyObject *__pyx_n_s_ci;
2449 static PyObject *__pyx_n_s_cj;
2450 static PyObject *__pyx_n_s_ck;
2451 static PyObject *__pyx_n_s_class;
2452 static PyObject *__pyx_n_s_cline_in_traceback;
2453 static PyObject *__pyx_n_s_coefficients;
2454 static PyObject *__pyx_n_s_comm;
2455 static PyObject *__pyx_n_s_compKernelFlag;
2456 static PyObject *__pyx_n_s_components;
2457 static PyObject *__pyx_n_s_conservativeFlux;
2458 static PyObject *__pyx_n_s_conservativeFluxDict;
2459 static PyObject *__pyx_n_s_constant;
2460 static PyObject *__pyx_n_s_copy;
2461 static PyObject *__pyx_n_s_cq;
2462 static PyObject *__pyx_n_s_csrColumnOffsets;
2463 static PyObject *__pyx_n_s_csrColumnOffsets_eb;
2464 static PyObject *__pyx_n_s_csrColumnOffsets_eb_u_u;
2465 static PyObject *__pyx_n_s_csrColumnOffsets_u_u;
2466 static PyObject *__pyx_n_s_csrRowIndeces;
2467 static PyObject *__pyx_n_s_csrRowIndeces_u_u;
2468 static PyObject *__pyx_n_s_d;
2469 static PyObject *__pyx_n_s_dS_ref;
2470 static PyObject *__pyx_n_s_dV_ref;
2471 static PyObject *__pyx_n_s_data;
2472 static PyObject *__pyx_n_s_dc;
2473 static PyObject *__pyx_n_s_default;
2474 static PyObject *__pyx_n_s_defaultName;
2475 static PyObject *__pyx_n_s_df;
2476 static PyObject *__pyx_n_s_diffusion;
2477 static PyObject *__pyx_n_s_diffusionDict;
2478 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsD;
2479 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsD_2;
2480 static PyObject *__pyx_n_s_diffusiveFluxBoundaryConditionsS;
2481 static PyObject *__pyx_n_s_diffusiveFlux_bc;
2482 static PyObject *__pyx_n_s_diffusiveFlux_bc_flag;
2483 static PyObject *__pyx_n_s_dim;
2484 static PyObject *__pyx_n_s_dirichletConditions;
2485 static PyObject *__pyx_n_s_dirichletConditionsForceDOF;
2486 static PyObject *__pyx_n_s_dirichletNodeSetList;
2487 static PyObject *__pyx_n_s_doc;
2488 static PyObject *__pyx_n_s_dof;
2489 static PyObject *__pyx_n_s_dofBoundaryConditionsDict;
2490 static PyObject *__pyx_n_s_dofBoundaryConditionsSetterDict;
2491 static PyObject *__pyx_n_s_dofMap;
2492 static PyObject *__pyx_n_s_dphi;
2493 static PyObject *__pyx_n_s_dtype;
2494 static PyObject *__pyx_n_s_eN_global;
2495 static PyObject *__pyx_n_s_ebN;
2496 static PyObject *__pyx_n_s_ebNE;
2497 static PyObject *__pyx_n_s_ebN_element;
2498 static PyObject *__pyx_n_s_ebq;
2499 static PyObject *__pyx_n_s_ebq_global;
2500 static PyObject *__pyx_n_s_ebqe;
2501 static PyObject *__pyx_n_s_ebqe_a;
2502 static PyObject *__pyx_n_s_ebqe_bc_advectiveFlux_u_ext;
2503 static PyObject *__pyx_n_s_ebqe_bc_flux_u_ext;
2504 static PyObject *__pyx_n_s_ebqe_bc_u_ext;
2505 static PyObject *__pyx_n_s_ebqe_penalty;
2506 static PyObject *__pyx_n_s_ebqe_v;
2507 static PyObject *__pyx_n_s_elemQuadIsDict;
2508 static PyObject *__pyx_n_s_elementBoundaryDiametersArray;
2509 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2510 static PyObject *__pyx_n_s_elementBoundaryIntegralKeys;
2511 static PyObject *__pyx_n_s_elementBoundaryIntegrals;
2512 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2513 static PyObject *__pyx_n_s_elementBoundaryQuadrature;
2514 static PyObject *__pyx_n_s_elementBoundaryQuadratureDict;
2515 static PyObject *__pyx_n_s_elementBoundaryQuadratureDiction;
2516 static PyObject *__pyx_n_s_elementBoundaryQuadraturePoints;
2517 static PyObject *__pyx_n_s_elementBoundaryQuadratureRuleInd;
2518 static PyObject *__pyx_n_s_elementBoundaryQuadratureWeights;
2519 static PyObject *__pyx_n_s_elementDiameter;
2520 static PyObject *__pyx_n_s_elementDiametersArray;
2521 static PyObject *__pyx_n_s_elementEffectiveDiametersArray;
2522 static PyObject *__pyx_n_s_elementInnerDiametersArray;
2523 static PyObject *__pyx_n_s_elementIntegralKeys;
2524 static PyObject *__pyx_n_s_elementMaps;
2525 static PyObject *__pyx_n_s_elementNodesArray;
2526 static PyObject *__pyx_n_s_elementQuadrature;
2527 static PyObject *__pyx_n_s_elementQuadratureDict;
2528 static PyObject *__pyx_n_s_elementQuadratureDictionaryWrite;
2529 static PyObject *__pyx_n_s_elementQuadraturePoints;
2530 static PyObject *__pyx_n_s_elementQuadratureRuleIndeces;
2531 static PyObject *__pyx_n_s_elementQuadratureWeights;
2532 static PyObject *__pyx_kp_s_element_and_element_boundary_Jac;
2533 static PyObject *__pyx_n_s_enumerate;
2534 static PyObject *__pyx_n_s_estimate_mt;
2535 static PyObject *__pyx_n_s_evaluate;
2536 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2537 static PyObject *__pyx_n_s_exteriorElementBoundaryQuadratur;
2538 static PyObject *__pyx_n_s_fOfX;
2539 static PyObject *__pyx_n_s_fabs;
2540 static PyObject *__pyx_n_s_fbcObject;
2541 static PyObject *__pyx_n_s_femSpace;
2542 static PyObject *__pyx_n_s_fill;
2543 static PyObject *__pyx_n_s_flag;
2544 static PyObject *__pyx_n_s_flat;
2545 static PyObject *__pyx_n_s_fluxBoundaryConditions;
2546 static PyObject *__pyx_n_s_fluxBoundaryConditionsDict;
2547 static PyObject *__pyx_n_s_fluxBoundaryConditionsObjectsDic;
2548 static PyObject *__pyx_n_s_forceStrongConditions;
2549 static PyObject *__pyx_n_s_forceStrongDirichlet;
2550 static PyObject *__pyx_n_s_g;
2551 static PyObject *__pyx_n_s_get;
2552 static PyObject *__pyx_n_s_getAdvectiveFluxBoundaryConditio;
2553 static PyObject *__pyx_n_s_getBasisGradientValuesRef;
2554 static PyObject *__pyx_n_s_getBasisGradientValuesTraceRef;
2555 static PyObject *__pyx_n_s_getBasisValuesRef;
2556 static PyObject *__pyx_n_s_getBasisValuesTraceRef;
2557 static PyObject *__pyx_n_s_getCSRrepresentation;
2558 static PyObject *__pyx_n_s_getDiffusiveFluxBoundaryConditio;
2559 static PyObject *__pyx_n_s_getJacobian;
2560 static PyObject *__pyx_n_s_getPointwiseBoundaryConditions;
2561 static PyObject *__pyx_n_s_getResidual;
2562 static PyObject *__pyx_n_s_getValues;
2563 static PyObject *__pyx_n_s_getValuesGlobalExteriorTrace;
2564 static PyObject *__pyx_n_s_getstate;
2565 static PyObject *__pyx_n_s_globalJacobian;
2566 static PyObject *__pyx_n_s_globalMax;
2567 static PyObject *__pyx_n_s_globalResidual;
2568 static PyObject *__pyx_n_s_globalSum;
2569 static PyObject *__pyx_n_s_grad_psi;
2570 static PyObject *__pyx_n_s_grad_psi_trace;
2571 static PyObject *__pyx_kp_s_grad_u;
2572 static PyObject *__pyx_n_s_hamiltonian;
2573 static PyObject *__pyx_n_s_has_key;
2574 static PyObject *__pyx_n_s_i;
2575 static PyObject *__pyx_n_s_import;
2576 static PyObject *__pyx_kp_s_inflowBC_internalNodes_updateLoc;
2577 static PyObject *__pyx_n_s_inflowBoundaryBC;
2578 static PyObject *__pyx_n_s_inflowBoundaryBC_values;
2579 static PyObject *__pyx_n_s_inflowFlux;
2580 static PyObject *__pyx_n_s_init;
2581 static PyObject *__pyx_n_s_initializationPhase;
2582 static PyObject *__pyx_n_s_initializeElementBoundaryQuadrat;
2583 static PyObject *__pyx_n_s_initializeElementQuadrature;
2584 static PyObject *__pyx_n_s_initializeGlobalExteriorElementB;
2585 static PyObject *__pyx_n_s_initializeMesh;
2586 static PyObject *__pyx_n_s_initializeTimeIntegration;
2587 static PyObject *__pyx_n_s_integrateInterpolationPoints;
2588 static PyObject *__pyx_n_s_internalNodes;
2589 static PyObject *__pyx_n_s_internalNodesArray;
2590 static PyObject *__pyx_n_s_interpolationConditions;
2591 static PyObject *__pyx_n_s_isAdvectiveFluxBoundary_u;
2592 static PyObject *__pyx_n_s_isDOFBoundary;
2593 static PyObject *__pyx_n_s_isDOFBoundary_u;
2594 static PyObject *__pyx_n_s_isFluxBoundary_u;
2595 static PyObject *__pyx_n_s_iteritems;
2596 static PyObject *__pyx_n_s_jacobian;
2597 static PyObject *__pyx_n_s_k;
2598 static PyObject *__pyx_n_s_keys;
2599 static PyObject *__pyx_n_s_l2g;
2600 static PyObject *__pyx_n_s_l2proj;
2601 static PyObject *__pyx_n_s_lag;
2602 static PyObject *__pyx_n_s_lag_shockCapturing;
2603 static PyObject *__pyx_n_s_level;
2604 static PyObject *__pyx_n_s_linear;
2605 static PyObject *__pyx_n_s_localFunctionSpace;
2606 static PyObject *__pyx_n_s_log;
2607 static PyObject *__pyx_n_s_logEvent;
2608 static PyObject *__pyx_n_s_lowmem;
2609 static PyObject *__pyx_n_s_m;
2610 static PyObject *__pyx_n_s_main;
2611 static PyObject *__pyx_n_s_mass;
2612 static PyObject *__pyx_n_s_massConservationError;
2613 static PyObject *__pyx_n_s_massLumping;
2614 static PyObject *__pyx_n_s_matType;
2615 static PyObject *__pyx_n_s_math;
2616 static PyObject *__pyx_n_s_max;
2617 static PyObject *__pyx_n_s_max_nDOF_element;
2618 static PyObject *__pyx_n_s_memory;
2619 static PyObject *__pyx_n_s_mesh;
2620 static PyObject *__pyx_n_s_mesh_dof;
2621 static PyObject *__pyx_n_s_mesh_grad_trial_ref;
2622 static PyObject *__pyx_n_s_mesh_grad_trial_trace_ref;
2623 static PyObject *__pyx_n_s_mesh_l2g;
2624 static PyObject *__pyx_n_s_mesh_trial_ref;
2625 static PyObject *__pyx_n_s_mesh_trial_trace_ref;
2626 static PyObject *__pyx_n_s_metaclass;
2627 static PyObject *__pyx_n_s_mixedFlow;
2628 static PyObject *__pyx_n_s_module;
2629 static PyObject *__pyx_n_s_movingDomain;
2630 static PyObject *__pyx_n_s_n;
2631 static PyObject *__pyx_n_s_nCalls;
2632 static PyObject *__pyx_n_s_nDOF_mesh_trial_elementIn;
2633 static PyObject *__pyx_n_s_nDOF_phi_trial_element;
2634 static PyObject *__pyx_n_s_nDOF_test_element;
2635 static PyObject *__pyx_n_s_nDOF_test_elementIn;
2636 static PyObject *__pyx_n_s_nDOF_trial_element;
2637 static PyObject *__pyx_n_s_nDOF_trial_elementIn;
2638 static PyObject *__pyx_n_s_nElementBoundaries_element;
2639 static PyObject *__pyx_n_s_nElementBoundaries_global;
2640 static PyObject *__pyx_n_s_nElementBoundaryQuadraturePoints;
2641 static PyObject *__pyx_n_s_nElementBoundaryQuadraturePoints_2;
2642 static PyObject *__pyx_n_s_nElements_global;
2643 static PyObject *__pyx_n_s_nElements_owned;
2644 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2645 static PyObject *__pyx_n_s_nFreeDOF_global;
2646 static PyObject *__pyx_n_s_nFreeVDOF_global;
2647 static PyObject *__pyx_n_s_nI;
2648 static PyObject *__pyx_n_s_nNodes_element;
2649 static PyObject *__pyx_n_s_nNodes_global;
2650 static PyObject *__pyx_n_s_nNodes_internal;
2651 static PyObject *__pyx_n_s_nNonzerosInJacobian;
2652 static PyObject *__pyx_n_s_nQuadraturePoints;
2653 static PyObject *__pyx_n_s_nQuadraturePoints_element;
2654 static PyObject *__pyx_n_s_nQuadraturePoints_elementBoundar;
2655 static PyObject *__pyx_n_s_nQuadraturePoints_elementIn;
2656 static PyObject *__pyx_n_s_nQuadraturePoints_global;
2657 static PyObject *__pyx_n_s_nSpaceIn;
2658 static PyObject *__pyx_n_s_nSpace_global;
2659 static PyObject *__pyx_n_s_nSteps;
2660 static PyObject *__pyx_n_s_nStepsToDelay;
2661 static PyObject *__pyx_n_s_nVDOF_element;
2662 static PyObject *__pyx_n_s_n_phi_ip_element;
2663 static PyObject *__pyx_n_s_name;
2664 static PyObject *__pyx_n_s_name_2;
2665 static PyObject *__pyx_n_s_nc;
2666 static PyObject *__pyx_n_s_nd;
2667 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2668 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2669 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2670 static PyObject *__pyx_n_s_nodeArray;
2671 static PyObject *__pyx_n_s_nodeVelocityArray;
2672 static PyObject *__pyx_n_s_nonlinear;
2673 static PyObject *__pyx_n_s_nonlinear_function_evaluations;
2674 static PyObject *__pyx_n_s_nonlinear_function_jacobian_eval;
2675 static PyObject *__pyx_n_s_normal_ref;
2676 static PyObject *__pyx_n_s_numDiff;
2677 static PyObject *__pyx_n_s_numDiff_last;
2678 static PyObject *__pyx_n_s_numericalFlux;
2679 static PyObject *__pyx_n_s_numericalFluxType;
2680 static PyObject *__pyx_n_s_numpy;
2681 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2682 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2683 static PyObject *__pyx_n_s_offset;
2684 static PyObject *__pyx_n_s_offset_u;
2685 static PyObject *__pyx_n_s_options;
2686 static PyObject *__pyx_n_s_outFlow;
2687 static PyObject *__pyx_n_s_pdb;
2688 static PyObject *__pyx_n_s_penalty;
2689 static PyObject *__pyx_n_s_penalty_constant;
2690 static PyObject *__pyx_n_s_penalty_power;
2691 static PyObject *__pyx_n_s_periodicDirichletConditions;
2692 static PyObject *__pyx_n_s_phi;
2693 static PyObject *__pyx_n_s_phiDict;
2694 static PyObject *__pyx_n_s_phiTrialIsTrial;
2695 static PyObject *__pyx_n_s_phi_ip;
2696 static PyObject *__pyx_n_s_phi_k;
2697 static PyObject *__pyx_n_s_points_elementBoundaryQuadrature;
2698 static PyObject *__pyx_n_s_potential;
2699 static PyObject *__pyx_n_s_prepare;
2700 static PyObject *__pyx_n_s_proteus;
2701 static PyObject *__pyx_kp_s_proteus_ADR_pyx;
2702 static PyObject *__pyx_n_s_proteus_Comm;
2703 static PyObject *__pyx_n_s_proteus_FemTools;
2704 static PyObject *__pyx_n_s_proteus_NonlinearSolvers;
2705 static PyObject *__pyx_n_s_proteus_Profiling;
2706 static PyObject *__pyx_n_s_proteus_ShockCapturing;
2707 static PyObject *__pyx_n_s_proteus_SubgridError;
2708 static PyObject *__pyx_n_s_proteus_Transport;
2709 static PyObject *__pyx_n_s_proteus_TransportCoefficients;
2710 static PyObject *__pyx_n_s_proteus_ctransportCoefficients;
2711 static PyObject *__pyx_n_s_psi;
2712 static PyObject *__pyx_n_s_psi_trace;
2713 static PyObject *__pyx_n_s_q;
2714 static PyObject *__pyx_n_s_q_a;
2715 static PyObject *__pyx_n_s_q_numDiff_u;
2716 static PyObject *__pyx_n_s_q_numDiff_u_last;
2717 static PyObject *__pyx_n_s_q_r;
2718 static PyObject *__pyx_n_s_q_v;
2719 static PyObject *__pyx_n_s_qualname;
2720 static PyObject *__pyx_n_s_r;
2721 static PyObject *__pyx_n_s_range;
2722 static PyObject *__pyx_n_s_reaction;
2723 static PyObject *__pyx_n_s_reactionLumping;
2724 static PyObject *__pyx_n_s_reduce;
2725 static PyObject *__pyx_n_s_reduce_cython;
2726 static PyObject *__pyx_n_s_reduce_ex;
2727 static PyObject *__pyx_n_s_referenceFiniteElement;
2728 static PyObject *__pyx_n_s_reuse_test_trial_quadrature;
2729 static PyObject *__pyx_n_s_reuse_trial_and_test_quadrature;
2730 static PyObject *__pyx_n_s_row;
2731 static PyObject *__pyx_n_s_sc_alpha;
2732 static PyObject *__pyx_n_s_sc_beta;
2733 static PyObject *__pyx_n_s_sc_uref;
2734 static PyObject *__pyx_n_s_scalars_elementBoundaryQuadratur;
2735 static PyObject *__pyx_n_s_sd;
2736 static PyObject *__pyx_n_s_sdInfo;
2737 static PyObject *__pyx_n_s_sdInfo_u_u_colind;
2738 static PyObject *__pyx_n_s_sdInfo_u_u_rowptr;
2739 static PyObject *__pyx_n_s_self;
2740 static PyObject *__pyx_n_s_setDirichletValues;
2741 static PyObject *__pyx_n_s_setFlow;
2742 static PyObject *__pyx_n_s_setFromOptions;
2743 static PyObject *__pyx_n_s_setUnknowns;
2744 static PyObject *__pyx_n_s_setstate;
2745 static PyObject *__pyx_n_s_setstate_cython;
2746 static PyObject *__pyx_n_s_setupFieldStrides;
2747 static PyObject *__pyx_n_s_shape;
2748 static PyObject *__pyx_n_s_shockCapturing;
2749 static PyObject *__pyx_n_s_shockCapturingDiffusion;
2750 static PyObject *__pyx_n_s_shockCapturingFactor;
2751 static PyObject *__pyx_n_s_size;
2752 static PyObject *__pyx_n_s_sparseDiffusionTensors;
2753 static PyObject *__pyx_n_s_stab;
2754 static PyObject *__pyx_n_s_stabilization;
2755 static PyObject *__pyx_n_s_stabilizationIsNonlinear;
2756 static PyObject *__pyx_n_s_start;
2757 static PyObject *__pyx_n_s_step;
2758 static PyObject *__pyx_n_s_stop;
2759 static PyObject *__pyx_n_s_stressTraceBoundaryConditionsSet;
2760 static PyObject *__pyx_n_s_stride;
2761 static PyObject *__pyx_kp_s_stride_offset;
2762 static PyObject *__pyx_n_s_stride_u;
2763 static PyObject *__pyx_n_s_sum;
2764 static PyObject *__pyx_n_s_t;
2765 static PyObject *__pyx_n_s_tLast_mesh;
2766 static PyObject *__pyx_n_s_tensors_elementBoundaryQuadratur;
2767 static PyObject *__pyx_n_s_test;
2768 static PyObject *__pyx_n_s_testIsTrial;
2769 static PyObject *__pyx_n_s_testSpace;
2770 static PyObject *__pyx_n_s_testSpaceDict;
2771 static PyObject *__pyx_n_s_timeIntegration;
2772 static PyObject *__pyx_n_s_timeTerm;
2773 static PyObject *__pyx_n_s_timeVaryingCoefficients;
2774 static PyObject *__pyx_kp_s_to_reuse_test_trial_quad_all_fem;
2775 static PyObject *__pyx_n_s_u;
2776 static PyObject *__pyx_n_s_uDict;
2777 static PyObject *__pyx_n_s_u_dof;
2778 static PyObject *__pyx_n_s_u_grad_test_ref;
2779 static PyObject *__pyx_n_s_u_grad_test_trace_ref;
2780 static PyObject *__pyx_n_s_u_grad_trial_ref;
2781 static PyObject *__pyx_n_s_u_grad_trial_trace_ref;
2782 static PyObject *__pyx_n_s_u_j;
2783 static PyObject *__pyx_n_s_u_l2g;
2784 static PyObject *__pyx_n_s_u_test_ref;
2785 static PyObject *__pyx_n_s_u_test_trace_ref;
2786 static PyObject *__pyx_n_s_u_trial_ref;
2787 static PyObject *__pyx_n_s_u_trial_trace_ref;
2788 static PyObject *__pyx_n_s_ua;
2789 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2790 static PyObject *__pyx_n_s_updateLocal2Global;
2791 static PyObject *__pyx_n_s_updateShockCapturingHistory;
2792 static PyObject *__pyx_n_s_updateSubgridErrorHistory;
2793 static PyObject *__pyx_n_s_useMetrics;
2794 static PyObject *__pyx_n_s_useSparseDiffusion;
2795 static PyObject *__pyx_n_s_useWeakDirichletConditions;
2796 static PyObject *__pyx_n_s_usesGradientStabilization;
2797 static PyObject *__pyx_n_s_values;
2798 static PyObject *__pyx_n_s_variableNames;
2799 static PyObject *__pyx_n_s_vectors_elementBoundaryQuadratur;
2800 static PyObject *__pyx_n_s_velocity;
2801 static PyObject *__pyx_n_s_velocityPostProcessor;
2802 static PyObject *__pyx_kp_s_velocity_postprocessor;
2803 static PyObject *__pyx_n_s_vt;
2804 static PyObject *__pyx_n_s_weakDirichletConditions;
2805 static PyObject *__pyx_n_s_x;
2806 static PyObject *__pyx_n_s_zeroJacobian_CSR;
2807 static PyObject *__pyx_n_s_zeros;
2808 static int __pyx_pf_3ADR_3ADR___cinit__(struct __pyx_obj_3ADR_ADR *__pyx_v_self, int __pyx_v_nSpaceIn, int __pyx_v_nQuadraturePoints_elementIn, int __pyx_v_nDOF_mesh_trial_elementIn, int __pyx_v_nDOF_trial_elementIn, int __pyx_v_nDOF_test_elementIn, int __pyx_v_nQuadraturePoints_elementBoundaryIn, int __pyx_v_CompKernelFlag); /* proto */
2809 static void __pyx_pf_3ADR_3ADR_2__dealloc__(struct __pyx_obj_3ADR_ADR *__pyx_v_self); /* proto */
2810 static PyObject *__pyx_pf_3ADR_3ADR_4calculateResidual(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, int __pyx_v_offset_u, int __pyx_v_stride_u, PyArrayObject *__pyx_v_globalResidual, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma); /* proto */
2811 static PyObject *__pyx_pf_3ADR_3ADR_6calculateJacobian(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, PyArrayObject *__pyx_v_csrRowIndeces_u_u, PyArrayObject *__pyx_v_csrColumnOffsets_u_u, PyObject *__pyx_v_globalJacobian, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma); /* proto */
2812 static PyObject *__pyx_pf_3ADR_3ADR_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3ADR_ADR *__pyx_v_self); /* proto */
2813 static PyObject *__pyx_pf_3ADR_3ADR_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3ADR_ADR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2814 static PyObject *__pyx_pf_3ADR_12SubgridError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd); /* proto */
2815 static PyObject *__pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_cq); /* proto */
2816 static PyObject *__pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_initializationPhase); /* proto */
2817 static PyObject *__pyx_pf_3ADR_12SubgridError_6calculateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_q); /* proto */
2818 static PyObject *__pyx_pf_3ADR_14ShockCapturing___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd, PyObject *__pyx_v_shockCapturingFactor, PyObject *__pyx_v_lag, PyObject *__pyx_v_nStepsToDelay); /* proto */
2819 static PyObject *__pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq); /* proto */
2820 static PyObject *__pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2821 static PyObject *__pyx_pf_3ADR_18NumericalFlux_IIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2822 static PyObject *__pyx_pf_3ADR_18NumericalFlux_SIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2823 static PyObject *__pyx_pf_3ADR_18NumericalFlux_NIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions); /* proto */
2824 static PyObject *__pyx_pf_3ADR_12Coefficients___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aOfX, PyObject *__pyx_v_fOfX, PyObject *__pyx_v_velocity, PyObject *__pyx_v_nc, PyObject *__pyx_v_nd, PyObject *__pyx_v_l2proj, PyObject *__pyx_v_timeVaryingCoefficients, PyObject *__pyx_v_forceStrongDirichlet, PyObject *__pyx_v_useMetrics, PyObject *__pyx_v_sc_uref, PyObject *__pyx_v_sc_beta); /* proto */
2825 static PyObject *__pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq); /* proto */
2826 static PyObject *__pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebq, PyObject *__pyx_v_cebq_global); /* proto */
2827 static PyObject *__pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebqe); /* proto */
2828 static PyObject *__pyx_pf_3ADR_12Coefficients_8evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_c); /* proto */
2829 static PyObject *__pyx_pf_3ADR_10LevelModel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_uDict, PyObject *__pyx_v_phiDict, PyObject *__pyx_v_testSpaceDict, PyObject *__pyx_v_matType, PyObject *__pyx_v_dofBoundaryConditionsDict, PyObject *__pyx_v_dofBoundaryConditionsSetterDict, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_elementQuadrature, PyObject *__pyx_v_elementBoundaryQuadrature, PyObject *__pyx_v_fluxBoundaryConditionsDict, PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict, PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict, PyObject *__pyx_v_stabilization, PyObject *__pyx_v_shockCapturing, PyObject *__pyx_v_conservativeFluxDict, PyObject *__pyx_v_numericalFluxType, PyObject *__pyx_v_TimeIntegrationClass, PyObject *__pyx_v_massLumping, PyObject *__pyx_v_reactionLumping, PyObject *__pyx_v_options, PyObject *__pyx_v_name, PyObject *__pyx_v_reuse_trial_and_test_quadrature, PyObject *__pyx_v_sd, PyObject *__pyx_v_movingDomain); /* proto */
2830 static PyObject *__pyx_pf_3ADR_10LevelModel_2calculateCoefficients(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2831 static PyObject *__pyx_pf_3ADR_10LevelModel_4getResidual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_r); /* proto */
2832 static PyObject *__pyx_pf_3ADR_10LevelModel_6getJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacobian); /* proto */
2833 static PyObject *__pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2834 static PyObject *__pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2835 static PyObject *__pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
2836 static PyObject *__pyx_pf_3ADR_10LevelModel_14estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2837 static PyObject *__pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2838 static PyObject *__pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
2839 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2840 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2841 static PyObject *__pyx_tp_new_3ADR_ADR(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2842 static PyObject *__pyx_float_0_0;
2843 static PyObject *__pyx_float_1_0;
2844 static PyObject *__pyx_float_0_25;
2845 static PyObject *__pyx_int_0;
2846 static PyObject *__pyx_int_1;
2847 static PyObject *__pyx_int_2;
2848 static PyObject *__pyx_int_3;
2849 static PyObject *__pyx_int_4;
2850 static PyObject *__pyx_int_5;
2851 static PyObject *__pyx_int_6;
2852 static PyObject *__pyx_int_9;
2853 static PyObject *__pyx_int_10;
2854 static PyObject *__pyx_tuple_;
2855 static PyObject *__pyx_slice__3;
2856 static PyObject *__pyx_slice__7;
2857 static PyObject *__pyx_tuple__2;
2858 static PyObject *__pyx_tuple__4;
2859 static PyObject *__pyx_tuple__5;
2860 static PyObject *__pyx_tuple__6;
2861 static PyObject *__pyx_tuple__8;
2862 static PyObject *__pyx_tuple__9;
2863 static PyObject *__pyx_tuple__10;
2864 static PyObject *__pyx_tuple__11;
2865 static PyObject *__pyx_tuple__12;
2866 static PyObject *__pyx_tuple__13;
2867 static PyObject *__pyx_tuple__14;
2868 static PyObject *__pyx_tuple__15;
2869 static PyObject *__pyx_tuple__16;
2870 static PyObject *__pyx_tuple__17;
2871 static PyObject *__pyx_tuple__18;
2872 static PyObject *__pyx_tuple__19;
2873 static PyObject *__pyx_tuple__20;
2874 static PyObject *__pyx_tuple__21;
2875 static PyObject *__pyx_tuple__22;
2876 static PyObject *__pyx_tuple__23;
2877 static PyObject *__pyx_tuple__24;
2878 static PyObject *__pyx_tuple__25;
2879 static PyObject *__pyx_tuple__26;
2880 static PyObject *__pyx_tuple__27;
2881 static PyObject *__pyx_tuple__28;
2882 static PyObject *__pyx_tuple__29;
2883 static PyObject *__pyx_tuple__30;
2884 static PyObject *__pyx_tuple__31;
2885 static PyObject *__pyx_tuple__32;
2886 static PyObject *__pyx_tuple__33;
2887 static PyObject *__pyx_tuple__34;
2888 static PyObject *__pyx_tuple__35;
2889 static PyObject *__pyx_tuple__36;
2890 static PyObject *__pyx_tuple__37;
2891 static PyObject *__pyx_tuple__38;
2892 static PyObject *__pyx_tuple__40;
2893 static PyObject *__pyx_tuple__42;
2894 static PyObject *__pyx_tuple__44;
2895 static PyObject *__pyx_tuple__45;
2896 static PyObject *__pyx_tuple__47;
2897 static PyObject *__pyx_tuple__49;
2898 static PyObject *__pyx_tuple__50;
2899 static PyObject *__pyx_tuple__52;
2900 static PyObject *__pyx_tuple__54;
2901 static PyObject *__pyx_tuple__56;
2902 static PyObject *__pyx_tuple__58;
2903 static PyObject *__pyx_tuple__60;
2904 static PyObject *__pyx_tuple__62;
2905 static PyObject *__pyx_tuple__63;
2906 static PyObject *__pyx_tuple__65;
2907 static PyObject *__pyx_tuple__67;
2908 static PyObject *__pyx_tuple__69;
2909 static PyObject *__pyx_tuple__71;
2910 static PyObject *__pyx_tuple__73;
2911 static PyObject *__pyx_tuple__74;
2912 static PyObject *__pyx_tuple__76;
2913 static PyObject *__pyx_tuple__78;
2914 static PyObject *__pyx_tuple__80;
2915 static PyObject *__pyx_tuple__82;
2916 static PyObject *__pyx_tuple__84;
2917 static PyObject *__pyx_tuple__86;
2918 static PyObject *__pyx_tuple__88;
2919 static PyObject *__pyx_tuple__90;
2920 static PyObject *__pyx_codeobj__39;
2921 static PyObject *__pyx_codeobj__41;
2922 static PyObject *__pyx_codeobj__43;
2923 static PyObject *__pyx_codeobj__46;
2924 static PyObject *__pyx_codeobj__48;
2925 static PyObject *__pyx_codeobj__51;
2926 static PyObject *__pyx_codeobj__53;
2927 static PyObject *__pyx_codeobj__55;
2928 static PyObject *__pyx_codeobj__57;
2929 static PyObject *__pyx_codeobj__59;
2930 static PyObject *__pyx_codeobj__61;
2931 static PyObject *__pyx_codeobj__64;
2932 static PyObject *__pyx_codeobj__66;
2933 static PyObject *__pyx_codeobj__68;
2934 static PyObject *__pyx_codeobj__70;
2935 static PyObject *__pyx_codeobj__72;
2936 static PyObject *__pyx_codeobj__75;
2937 static PyObject *__pyx_codeobj__77;
2938 static PyObject *__pyx_codeobj__79;
2939 static PyObject *__pyx_codeobj__81;
2940 static PyObject *__pyx_codeobj__83;
2941 static PyObject *__pyx_codeobj__85;
2942 static PyObject *__pyx_codeobj__87;
2943 static PyObject *__pyx_codeobj__89;
2944 static PyObject *__pyx_codeobj__91;
2945 /* Late includes */
2946 
2947 /* "ADR.pyx":146
2948  *
2949  * cdef cppADR_base* thisptr
2950  * def __cinit__(self, # <<<<<<<<<<<<<<
2951  * int nSpaceIn,
2952  * int nQuadraturePoints_elementIn,
2953  */
2954 
2955 /* Python wrapper */
2956 static int __pyx_pw_3ADR_3ADR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2957 static int __pyx_pw_3ADR_3ADR_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2958  int __pyx_v_nSpaceIn;
2959  int __pyx_v_nQuadraturePoints_elementIn;
2960  int __pyx_v_nDOF_mesh_trial_elementIn;
2961  int __pyx_v_nDOF_trial_elementIn;
2962  int __pyx_v_nDOF_test_elementIn;
2963  int __pyx_v_nQuadraturePoints_elementBoundaryIn;
2964  int __pyx_v_CompKernelFlag;
2965  int __pyx_r;
2966  __Pyx_RefNannyDeclarations
2967  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2968  {
2969  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpaceIn,&__pyx_n_s_nQuadraturePoints_elementIn,&__pyx_n_s_nDOF_mesh_trial_elementIn,&__pyx_n_s_nDOF_trial_elementIn,&__pyx_n_s_nDOF_test_elementIn,&__pyx_n_s_nQuadraturePoints_elementBoundar,&__pyx_n_s_CompKernelFlag,0};
2970  PyObject* values[7] = {0,0,0,0,0,0,0};
2971  if (unlikely(__pyx_kwds)) {
2972  Py_ssize_t kw_args;
2973  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2974  switch (pos_args) {
2975  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
2976  CYTHON_FALLTHROUGH;
2977  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
2978  CYTHON_FALLTHROUGH;
2979  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
2980  CYTHON_FALLTHROUGH;
2981  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
2982  CYTHON_FALLTHROUGH;
2983  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2984  CYTHON_FALLTHROUGH;
2985  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2986  CYTHON_FALLTHROUGH;
2987  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2988  CYTHON_FALLTHROUGH;
2989  case 0: break;
2990  default: goto __pyx_L5_argtuple_error;
2991  }
2992  kw_args = PyDict_Size(__pyx_kwds);
2993  switch (pos_args) {
2994  case 0:
2995  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpaceIn)) != 0)) kw_args--;
2996  else goto __pyx_L5_argtuple_error;
2997  CYTHON_FALLTHROUGH;
2998  case 1:
2999  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementIn)) != 0)) kw_args--;
3000  else {
3001  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); __PYX_ERR(1, 146, __pyx_L3_error)
3002  }
3003  CYTHON_FALLTHROUGH;
3004  case 2:
3005  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_mesh_trial_elementIn)) != 0)) kw_args--;
3006  else {
3007  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); __PYX_ERR(1, 146, __pyx_L3_error)
3008  }
3009  CYTHON_FALLTHROUGH;
3010  case 3:
3011  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_trial_elementIn)) != 0)) kw_args--;
3012  else {
3013  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); __PYX_ERR(1, 146, __pyx_L3_error)
3014  }
3015  CYTHON_FALLTHROUGH;
3016  case 4:
3017  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nDOF_test_elementIn)) != 0)) kw_args--;
3018  else {
3019  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); __PYX_ERR(1, 146, __pyx_L3_error)
3020  }
3021  CYTHON_FALLTHROUGH;
3022  case 5:
3023  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nQuadraturePoints_elementBoundar)) != 0)) kw_args--;
3024  else {
3025  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); __PYX_ERR(1, 146, __pyx_L3_error)
3026  }
3027  CYTHON_FALLTHROUGH;
3028  case 6:
3029  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_CompKernelFlag)) != 0)) kw_args--;
3030  else {
3031  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); __PYX_ERR(1, 146, __pyx_L3_error)
3032  }
3033  }
3034  if (unlikely(kw_args > 0)) {
3035  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 146, __pyx_L3_error)
3036  }
3037  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
3038  goto __pyx_L5_argtuple_error;
3039  } else {
3040  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3041  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3042  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3043  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3044  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3045  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3046  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3047  }
3048  __pyx_v_nSpaceIn = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpaceIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L3_error)
3049  __pyx_v_nQuadraturePoints_elementIn = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nQuadraturePoints_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 148, __pyx_L3_error)
3050  __pyx_v_nDOF_mesh_trial_elementIn = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nDOF_mesh_trial_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L3_error)
3051  __pyx_v_nDOF_trial_elementIn = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nDOF_trial_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 150, __pyx_L3_error)
3052  __pyx_v_nDOF_test_elementIn = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_nDOF_test_elementIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L3_error)
3053  __pyx_v_nQuadraturePoints_elementBoundaryIn = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_nQuadraturePoints_elementBoundaryIn == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 152, __pyx_L3_error)
3054  __pyx_v_CompKernelFlag = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_CompKernelFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 153, __pyx_L3_error)
3055  }
3056  goto __pyx_L4_argument_unpacking_done;
3057  __pyx_L5_argtuple_error:;
3058  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 146, __pyx_L3_error)
3059  __pyx_L3_error:;
3060  __Pyx_AddTraceback("ADR.ADR.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3061  __Pyx_RefNannyFinishContext();
3062  return -1;
3063  __pyx_L4_argument_unpacking_done:;
3064  __pyx_r = __pyx_pf_3ADR_3ADR___cinit__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_nSpaceIn, __pyx_v_nQuadraturePoints_elementIn, __pyx_v_nDOF_mesh_trial_elementIn, __pyx_v_nDOF_trial_elementIn, __pyx_v_nDOF_test_elementIn, __pyx_v_nQuadraturePoints_elementBoundaryIn, __pyx_v_CompKernelFlag);
3065 
3066  /* function exit code */
3067  __Pyx_RefNannyFinishContext();
3068  return __pyx_r;
3069 }
3070 
3071 static int __pyx_pf_3ADR_3ADR___cinit__(struct __pyx_obj_3ADR_ADR *__pyx_v_self, int __pyx_v_nSpaceIn, int __pyx_v_nQuadraturePoints_elementIn, int __pyx_v_nDOF_mesh_trial_elementIn, int __pyx_v_nDOF_trial_elementIn, int __pyx_v_nDOF_test_elementIn, int __pyx_v_nQuadraturePoints_elementBoundaryIn, int __pyx_v_CompKernelFlag) {
3072  int __pyx_r;
3073  __Pyx_RefNannyDeclarations
3074  __Pyx_RefNannySetupContext("__cinit__", 0);
3075 
3076  /* "ADR.pyx":154
3077  * int nQuadraturePoints_elementBoundaryIn,
3078  * int CompKernelFlag):
3079  * self.thisptr = newADR(nSpaceIn, # <<<<<<<<<<<<<<
3080  * nQuadraturePoints_elementIn,
3081  * nDOF_mesh_trial_elementIn,
3082  */
3083  __pyx_v_self->thisptr = proteus::newADR(__pyx_v_nSpaceIn, __pyx_v_nQuadraturePoints_elementIn, __pyx_v_nDOF_mesh_trial_elementIn, __pyx_v_nDOF_trial_elementIn, __pyx_v_nDOF_test_elementIn, __pyx_v_nQuadraturePoints_elementBoundaryIn, __pyx_v_CompKernelFlag);
3084 
3085  /* "ADR.pyx":146
3086  *
3087  * cdef cppADR_base* thisptr
3088  * def __cinit__(self, # <<<<<<<<<<<<<<
3089  * int nSpaceIn,
3090  * int nQuadraturePoints_elementIn,
3091  */
3092 
3093  /* function exit code */
3094  __pyx_r = 0;
3095  __Pyx_RefNannyFinishContext();
3096  return __pyx_r;
3097 }
3098 
3099 /* "ADR.pyx":161
3100  * nQuadraturePoints_elementBoundaryIn,
3101  * CompKernelFlag)
3102  * def __dealloc__(self): # <<<<<<<<<<<<<<
3103  * del self.thisptr
3104  * def calculateResidual(self,
3105  */
3106 
3107 /* Python wrapper */
3108 static void __pyx_pw_3ADR_3ADR_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
3109 static void __pyx_pw_3ADR_3ADR_3__dealloc__(PyObject *__pyx_v_self) {
3110  __Pyx_RefNannyDeclarations
3111  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3112  __pyx_pf_3ADR_3ADR_2__dealloc__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self));
3113 
3114  /* function exit code */
3115  __Pyx_RefNannyFinishContext();
3116 }
3117 
3118 static void __pyx_pf_3ADR_3ADR_2__dealloc__(struct __pyx_obj_3ADR_ADR *__pyx_v_self) {
3119  __Pyx_RefNannyDeclarations
3120  __Pyx_RefNannySetupContext("__dealloc__", 0);
3121 
3122  /* "ADR.pyx":162
3123  * CompKernelFlag)
3124  * def __dealloc__(self):
3125  * del self.thisptr # <<<<<<<<<<<<<<
3126  * def calculateResidual(self,
3127  * numpy.ndarray mesh_trial_ref,
3128  */
3129  delete __pyx_v_self->thisptr;
3130 
3131  /* "ADR.pyx":161
3132  * nQuadraturePoints_elementBoundaryIn,
3133  * CompKernelFlag)
3134  * def __dealloc__(self): # <<<<<<<<<<<<<<
3135  * del self.thisptr
3136  * def calculateResidual(self,
3137  */
3138 
3139  /* function exit code */
3140  __Pyx_RefNannyFinishContext();
3141 }
3142 
3143 /* "ADR.pyx":163
3144  * def __dealloc__(self):
3145  * del self.thisptr
3146  * def calculateResidual(self, # <<<<<<<<<<<<<<
3147  * numpy.ndarray mesh_trial_ref,
3148  * numpy.ndarray mesh_grad_trial_ref,
3149  */
3150 
3151 /* Python wrapper */
3152 static PyObject *__pyx_pw_3ADR_3ADR_5calculateResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3153 static PyObject *__pyx_pw_3ADR_3ADR_5calculateResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3154  PyArrayObject *__pyx_v_mesh_trial_ref = 0;
3155  PyArrayObject *__pyx_v_mesh_grad_trial_ref = 0;
3156  PyArrayObject *__pyx_v_mesh_dof = 0;
3157  PyArrayObject *__pyx_v_mesh_l2g = 0;
3158  PyArrayObject *__pyx_v_dV_ref = 0;
3159  PyArrayObject *__pyx_v_u_trial_ref = 0;
3160  PyArrayObject *__pyx_v_u_grad_trial_ref = 0;
3161  PyArrayObject *__pyx_v_u_test_ref = 0;
3162  PyArrayObject *__pyx_v_u_grad_test_ref = 0;
3163  PyArrayObject *__pyx_v_elementDiameter = 0;
3164  PyArrayObject *__pyx_v_cfl = 0;
3165  double __pyx_v_CT_sge;
3166  double __pyx_v_sc_uref;
3167  double __pyx_v_sc_alpha;
3168  double __pyx_v_useMetrics;
3169  PyArrayObject *__pyx_v_mesh_trial_trace_ref = 0;
3170  PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref = 0;
3171  PyArrayObject *__pyx_v_dS_ref = 0;
3172  PyArrayObject *__pyx_v_u_trial_trace_ref = 0;
3173  PyArrayObject *__pyx_v_u_grad_trial_trace_ref = 0;
3174  PyArrayObject *__pyx_v_u_test_trace_ref = 0;
3175  PyArrayObject *__pyx_v_u_grad_test_trace_ref = 0;
3176  PyArrayObject *__pyx_v_normal_ref = 0;
3177  PyArrayObject *__pyx_v_boundaryJac_ref = 0;
3178  int __pyx_v_nElements_global;
3179  PyArrayObject *__pyx_v_u_l2g = 0;
3180  PyArrayObject *__pyx_v_u_dof = 0;
3181  PyArrayObject *__pyx_v_sdInfo_u_u_rowptr = 0;
3182  PyArrayObject *__pyx_v_sdInfo_u_u_colind = 0;
3183  PyArrayObject *__pyx_v_q_a = 0;
3184  PyArrayObject *__pyx_v_q_v = 0;
3185  PyArrayObject *__pyx_v_q_r = 0;
3186  int __pyx_v_lag_shockCapturing;
3187  double __pyx_v_shockCapturingDiffusion;
3188  PyArrayObject *__pyx_v_q_numDiff_u = 0;
3189  PyArrayObject *__pyx_v_q_numDiff_u_last = 0;
3190  int __pyx_v_offset_u;
3191  int __pyx_v_stride_u;
3192  PyArrayObject *__pyx_v_globalResidual = 0;
3193  int __pyx_v_nExteriorElementBoundaries_global;
3194  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
3195  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
3196  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
3197  PyArrayObject *__pyx_v_ebqe_a = 0;
3198  PyArrayObject *__pyx_v_ebqe_v = 0;
3199  PyArrayObject *__pyx_v_isDOFBoundary_u = 0;
3200  PyArrayObject *__pyx_v_ebqe_bc_u_ext = 0;
3201  PyArrayObject *__pyx_v_isFluxBoundary_u = 0;
3202  PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u = 0;
3203  PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext = 0;
3204  PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext = 0;
3205  PyArrayObject *__pyx_v_ebqe_penalty = 0;
3206  double __pyx_v_adjoint_sigma;
3207  PyObject *__pyx_r = 0;
3208  __Pyx_RefNannyDeclarations
3209  __Pyx_RefNannySetupContext("calculateResidual (wrapper)", 0);
3210  {
3211  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mesh_trial_ref,&__pyx_n_s_mesh_grad_trial_ref,&__pyx_n_s_mesh_dof,&__pyx_n_s_mesh_l2g,&__pyx_n_s_dV_ref,&__pyx_n_s_u_trial_ref,&__pyx_n_s_u_grad_trial_ref,&__pyx_n_s_u_test_ref,&__pyx_n_s_u_grad_test_ref,&__pyx_n_s_elementDiameter,&__pyx_n_s_cfl,&__pyx_n_s_CT_sge,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_alpha,&__pyx_n_s_useMetrics,&__pyx_n_s_mesh_trial_trace_ref,&__pyx_n_s_mesh_grad_trial_trace_ref,&__pyx_n_s_dS_ref,&__pyx_n_s_u_trial_trace_ref,&__pyx_n_s_u_grad_trial_trace_ref,&__pyx_n_s_u_test_trace_ref,&__pyx_n_s_u_grad_test_trace_ref,&__pyx_n_s_normal_ref,&__pyx_n_s_boundaryJac_ref,&__pyx_n_s_nElements_global,&__pyx_n_s_u_l2g,&__pyx_n_s_u_dof,&__pyx_n_s_sdInfo_u_u_rowptr,&__pyx_n_s_sdInfo_u_u_colind,&__pyx_n_s_q_a,&__pyx_n_s_q_v,&__pyx_n_s_q_r,&__pyx_n_s_lag_shockCapturing,&__pyx_n_s_shockCapturingDiffusion,&__pyx_n_s_q_numDiff_u,&__pyx_n_s_q_numDiff_u_last,&__pyx_n_s_offset_u,&__pyx_n_s_stride_u,&__pyx_n_s_globalResidual,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_a,&__pyx_n_s_ebqe_v,&__pyx_n_s_isDOFBoundary_u,&__pyx_n_s_ebqe_bc_u_ext,&__pyx_n_s_isFluxBoundary_u,&__pyx_n_s_isAdvectiveFluxBoundary_u,&__pyx_n_s_ebqe_bc_flux_u_ext,&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext,&__pyx_n_s_ebqe_penalty,&__pyx_n_s_adjoint_sigma,0};
3212  PyObject* values[53] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3213  if (unlikely(__pyx_kwds)) {
3214  Py_ssize_t kw_args;
3215  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3216  switch (pos_args) {
3217  case 53: values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3218  CYTHON_FALLTHROUGH;
3219  case 52: values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3220  CYTHON_FALLTHROUGH;
3221  case 51: values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3222  CYTHON_FALLTHROUGH;
3223  case 50: values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3224  CYTHON_FALLTHROUGH;
3225  case 49: values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3226  CYTHON_FALLTHROUGH;
3227  case 48: values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3228  CYTHON_FALLTHROUGH;
3229  case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3230  CYTHON_FALLTHROUGH;
3231  case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3232  CYTHON_FALLTHROUGH;
3233  case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3234  CYTHON_FALLTHROUGH;
3235  case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3236  CYTHON_FALLTHROUGH;
3237  case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3238  CYTHON_FALLTHROUGH;
3239  case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3240  CYTHON_FALLTHROUGH;
3241  case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3242  CYTHON_FALLTHROUGH;
3243  case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3244  CYTHON_FALLTHROUGH;
3245  case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3246  CYTHON_FALLTHROUGH;
3247  case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3248  CYTHON_FALLTHROUGH;
3249  case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3250  CYTHON_FALLTHROUGH;
3251  case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3252  CYTHON_FALLTHROUGH;
3253  case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3254  CYTHON_FALLTHROUGH;
3255  case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3256  CYTHON_FALLTHROUGH;
3257  case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3258  CYTHON_FALLTHROUGH;
3259  case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3260  CYTHON_FALLTHROUGH;
3261  case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3262  CYTHON_FALLTHROUGH;
3263  case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3264  CYTHON_FALLTHROUGH;
3265  case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3266  CYTHON_FALLTHROUGH;
3267  case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3268  CYTHON_FALLTHROUGH;
3269  case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3270  CYTHON_FALLTHROUGH;
3271  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3272  CYTHON_FALLTHROUGH;
3273  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3274  CYTHON_FALLTHROUGH;
3275  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3276  CYTHON_FALLTHROUGH;
3277  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3278  CYTHON_FALLTHROUGH;
3279  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3280  CYTHON_FALLTHROUGH;
3281  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3282  CYTHON_FALLTHROUGH;
3283  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3284  CYTHON_FALLTHROUGH;
3285  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3286  CYTHON_FALLTHROUGH;
3287  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3288  CYTHON_FALLTHROUGH;
3289  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3290  CYTHON_FALLTHROUGH;
3291  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3292  CYTHON_FALLTHROUGH;
3293  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3294  CYTHON_FALLTHROUGH;
3295  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3296  CYTHON_FALLTHROUGH;
3297  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3298  CYTHON_FALLTHROUGH;
3299  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3300  CYTHON_FALLTHROUGH;
3301  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3302  CYTHON_FALLTHROUGH;
3303  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3304  CYTHON_FALLTHROUGH;
3305  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3306  CYTHON_FALLTHROUGH;
3307  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3308  CYTHON_FALLTHROUGH;
3309  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3310  CYTHON_FALLTHROUGH;
3311  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3312  CYTHON_FALLTHROUGH;
3313  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3314  CYTHON_FALLTHROUGH;
3315  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3316  CYTHON_FALLTHROUGH;
3317  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3318  CYTHON_FALLTHROUGH;
3319  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3320  CYTHON_FALLTHROUGH;
3321  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3322  CYTHON_FALLTHROUGH;
3323  case 0: break;
3324  default: goto __pyx_L5_argtuple_error;
3325  }
3326  kw_args = PyDict_Size(__pyx_kwds);
3327  switch (pos_args) {
3328  case 0:
3329  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_trial_ref)) != 0)) kw_args--;
3330  else goto __pyx_L5_argtuple_error;
3331  CYTHON_FALLTHROUGH;
3332  case 1:
3333  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_grad_trial_ref)) != 0)) kw_args--;
3334  else {
3335  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 1); __PYX_ERR(1, 163, __pyx_L3_error)
3336  }
3337  CYTHON_FALLTHROUGH;
3338  case 2:
3339  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_dof)) != 0)) kw_args--;
3340  else {
3341  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 2); __PYX_ERR(1, 163, __pyx_L3_error)
3342  }
3343  CYTHON_FALLTHROUGH;
3344  case 3:
3345  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_l2g)) != 0)) kw_args--;
3346  else {
3347  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 3); __PYX_ERR(1, 163, __pyx_L3_error)
3348  }
3349  CYTHON_FALLTHROUGH;
3350  case 4:
3351  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dV_ref)) != 0)) kw_args--;
3352  else {
3353  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 4); __PYX_ERR(1, 163, __pyx_L3_error)
3354  }
3355  CYTHON_FALLTHROUGH;
3356  case 5:
3357  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_trial_ref)) != 0)) kw_args--;
3358  else {
3359  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 5); __PYX_ERR(1, 163, __pyx_L3_error)
3360  }
3361  CYTHON_FALLTHROUGH;
3362  case 6:
3363  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_trial_ref)) != 0)) kw_args--;
3364  else {
3365  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 6); __PYX_ERR(1, 163, __pyx_L3_error)
3366  }
3367  CYTHON_FALLTHROUGH;
3368  case 7:
3369  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_test_ref)) != 0)) kw_args--;
3370  else {
3371  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 7); __PYX_ERR(1, 163, __pyx_L3_error)
3372  }
3373  CYTHON_FALLTHROUGH;
3374  case 8:
3375  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_test_ref)) != 0)) kw_args--;
3376  else {
3377  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 8); __PYX_ERR(1, 163, __pyx_L3_error)
3378  }
3379  CYTHON_FALLTHROUGH;
3380  case 9:
3381  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
3382  else {
3383  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 9); __PYX_ERR(1, 163, __pyx_L3_error)
3384  }
3385  CYTHON_FALLTHROUGH;
3386  case 10:
3387  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
3388  else {
3389  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 10); __PYX_ERR(1, 163, __pyx_L3_error)
3390  }
3391  CYTHON_FALLTHROUGH;
3392  case 11:
3393  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_CT_sge)) != 0)) kw_args--;
3394  else {
3395  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 11); __PYX_ERR(1, 163, __pyx_L3_error)
3396  }
3397  CYTHON_FALLTHROUGH;
3398  case 12:
3399  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sc_uref)) != 0)) kw_args--;
3400  else {
3401  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 12); __PYX_ERR(1, 163, __pyx_L3_error)
3402  }
3403  CYTHON_FALLTHROUGH;
3404  case 13:
3405  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sc_alpha)) != 0)) kw_args--;
3406  else {
3407  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 13); __PYX_ERR(1, 163, __pyx_L3_error)
3408  }
3409  CYTHON_FALLTHROUGH;
3410  case 14:
3411  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useMetrics)) != 0)) kw_args--;
3412  else {
3413  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 14); __PYX_ERR(1, 163, __pyx_L3_error)
3414  }
3415  CYTHON_FALLTHROUGH;
3416  case 15:
3417  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_trial_trace_ref)) != 0)) kw_args--;
3418  else {
3419  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 15); __PYX_ERR(1, 163, __pyx_L3_error)
3420  }
3421  CYTHON_FALLTHROUGH;
3422  case 16:
3423  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_grad_trial_trace_ref)) != 0)) kw_args--;
3424  else {
3425  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 16); __PYX_ERR(1, 163, __pyx_L3_error)
3426  }
3427  CYTHON_FALLTHROUGH;
3428  case 17:
3429  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS_ref)) != 0)) kw_args--;
3430  else {
3431  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 17); __PYX_ERR(1, 163, __pyx_L3_error)
3432  }
3433  CYTHON_FALLTHROUGH;
3434  case 18:
3435  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_trial_trace_ref)) != 0)) kw_args--;
3436  else {
3437  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 18); __PYX_ERR(1, 163, __pyx_L3_error)
3438  }
3439  CYTHON_FALLTHROUGH;
3440  case 19:
3441  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_trial_trace_ref)) != 0)) kw_args--;
3442  else {
3443  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 19); __PYX_ERR(1, 163, __pyx_L3_error)
3444  }
3445  CYTHON_FALLTHROUGH;
3446  case 20:
3447  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_test_trace_ref)) != 0)) kw_args--;
3448  else {
3449  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 20); __PYX_ERR(1, 163, __pyx_L3_error)
3450  }
3451  CYTHON_FALLTHROUGH;
3452  case 21:
3453  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_test_trace_ref)) != 0)) kw_args--;
3454  else {
3455  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 21); __PYX_ERR(1, 163, __pyx_L3_error)
3456  }
3457  CYTHON_FALLTHROUGH;
3458  case 22:
3459  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal_ref)) != 0)) kw_args--;
3460  else {
3461  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 22); __PYX_ERR(1, 163, __pyx_L3_error)
3462  }
3463  CYTHON_FALLTHROUGH;
3464  case 23:
3465  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryJac_ref)) != 0)) kw_args--;
3466  else {
3467  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 23); __PYX_ERR(1, 163, __pyx_L3_error)
3468  }
3469  CYTHON_FALLTHROUGH;
3470  case 24:
3471  if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
3472  else {
3473  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 24); __PYX_ERR(1, 163, __pyx_L3_error)
3474  }
3475  CYTHON_FALLTHROUGH;
3476  case 25:
3477  if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_l2g)) != 0)) kw_args--;
3478  else {
3479  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 25); __PYX_ERR(1, 163, __pyx_L3_error)
3480  }
3481  CYTHON_FALLTHROUGH;
3482  case 26:
3483  if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_dof)) != 0)) kw_args--;
3484  else {
3485  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 26); __PYX_ERR(1, 163, __pyx_L3_error)
3486  }
3487  CYTHON_FALLTHROUGH;
3488  case 27:
3489  if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sdInfo_u_u_rowptr)) != 0)) kw_args--;
3490  else {
3491  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 27); __PYX_ERR(1, 163, __pyx_L3_error)
3492  }
3493  CYTHON_FALLTHROUGH;
3494  case 28:
3495  if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sdInfo_u_u_colind)) != 0)) kw_args--;
3496  else {
3497  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 28); __PYX_ERR(1, 163, __pyx_L3_error)
3498  }
3499  CYTHON_FALLTHROUGH;
3500  case 29:
3501  if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_a)) != 0)) kw_args--;
3502  else {
3503  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 29); __PYX_ERR(1, 163, __pyx_L3_error)
3504  }
3505  CYTHON_FALLTHROUGH;
3506  case 30:
3507  if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_v)) != 0)) kw_args--;
3508  else {
3509  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 30); __PYX_ERR(1, 163, __pyx_L3_error)
3510  }
3511  CYTHON_FALLTHROUGH;
3512  case 31:
3513  if (likely((values[31] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_r)) != 0)) kw_args--;
3514  else {
3515  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 31); __PYX_ERR(1, 163, __pyx_L3_error)
3516  }
3517  CYTHON_FALLTHROUGH;
3518  case 32:
3519  if (likely((values[32] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lag_shockCapturing)) != 0)) kw_args--;
3520  else {
3521  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 32); __PYX_ERR(1, 163, __pyx_L3_error)
3522  }
3523  CYTHON_FALLTHROUGH;
3524  case 33:
3525  if (likely((values[33] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shockCapturingDiffusion)) != 0)) kw_args--;
3526  else {
3527  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 33); __PYX_ERR(1, 163, __pyx_L3_error)
3528  }
3529  CYTHON_FALLTHROUGH;
3530  case 34:
3531  if (likely((values[34] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_numDiff_u)) != 0)) kw_args--;
3532  else {
3533  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 34); __PYX_ERR(1, 163, __pyx_L3_error)
3534  }
3535  CYTHON_FALLTHROUGH;
3536  case 35:
3537  if (likely((values[35] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_numDiff_u_last)) != 0)) kw_args--;
3538  else {
3539  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 35); __PYX_ERR(1, 163, __pyx_L3_error)
3540  }
3541  CYTHON_FALLTHROUGH;
3542  case 36:
3543  if (likely((values[36] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_u)) != 0)) kw_args--;
3544  else {
3545  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 36); __PYX_ERR(1, 163, __pyx_L3_error)
3546  }
3547  CYTHON_FALLTHROUGH;
3548  case 37:
3549  if (likely((values[37] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride_u)) != 0)) kw_args--;
3550  else {
3551  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 37); __PYX_ERR(1, 163, __pyx_L3_error)
3552  }
3553  CYTHON_FALLTHROUGH;
3554  case 38:
3555  if (likely((values[38] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalResidual)) != 0)) kw_args--;
3556  else {
3557  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 38); __PYX_ERR(1, 163, __pyx_L3_error)
3558  }
3559  CYTHON_FALLTHROUGH;
3560  case 39:
3561  if (likely((values[39] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
3562  else {
3563  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 39); __PYX_ERR(1, 163, __pyx_L3_error)
3564  }
3565  CYTHON_FALLTHROUGH;
3566  case 40:
3567  if (likely((values[40] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
3568  else {
3569  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 40); __PYX_ERR(1, 163, __pyx_L3_error)
3570  }
3571  CYTHON_FALLTHROUGH;
3572  case 41:
3573  if (likely((values[41] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
3574  else {
3575  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 41); __PYX_ERR(1, 163, __pyx_L3_error)
3576  }
3577  CYTHON_FALLTHROUGH;
3578  case 42:
3579  if (likely((values[42] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
3580  else {
3581  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 42); __PYX_ERR(1, 163, __pyx_L3_error)
3582  }
3583  CYTHON_FALLTHROUGH;
3584  case 43:
3585  if (likely((values[43] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_a)) != 0)) kw_args--;
3586  else {
3587  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 43); __PYX_ERR(1, 163, __pyx_L3_error)
3588  }
3589  CYTHON_FALLTHROUGH;
3590  case 44:
3591  if (likely((values[44] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_v)) != 0)) kw_args--;
3592  else {
3593  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 44); __PYX_ERR(1, 163, __pyx_L3_error)
3594  }
3595  CYTHON_FALLTHROUGH;
3596  case 45:
3597  if (likely((values[45] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary_u)) != 0)) kw_args--;
3598  else {
3599  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 45); __PYX_ERR(1, 163, __pyx_L3_error)
3600  }
3601  CYTHON_FALLTHROUGH;
3602  case 46:
3603  if (likely((values[46] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_bc_u_ext)) != 0)) kw_args--;
3604  else {
3605  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 46); __PYX_ERR(1, 163, __pyx_L3_error)
3606  }
3607  CYTHON_FALLTHROUGH;
3608  case 47:
3609  if (likely((values[47] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isFluxBoundary_u)) != 0)) kw_args--;
3610  else {
3611  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 47); __PYX_ERR(1, 163, __pyx_L3_error)
3612  }
3613  CYTHON_FALLTHROUGH;
3614  case 48:
3615  if (likely((values[48] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isAdvectiveFluxBoundary_u)) != 0)) kw_args--;
3616  else {
3617  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 48); __PYX_ERR(1, 163, __pyx_L3_error)
3618  }
3619  CYTHON_FALLTHROUGH;
3620  case 49:
3621  if (likely((values[49] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_bc_flux_u_ext)) != 0)) kw_args--;
3622  else {
3623  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 49); __PYX_ERR(1, 163, __pyx_L3_error)
3624  }
3625  CYTHON_FALLTHROUGH;
3626  case 50:
3627  if (likely((values[50] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_bc_advectiveFlux_u_ext)) != 0)) kw_args--;
3628  else {
3629  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 50); __PYX_ERR(1, 163, __pyx_L3_error)
3630  }
3631  CYTHON_FALLTHROUGH;
3632  case 51:
3633  if (likely((values[51] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_penalty)) != 0)) kw_args--;
3634  else {
3635  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 51); __PYX_ERR(1, 163, __pyx_L3_error)
3636  }
3637  CYTHON_FALLTHROUGH;
3638  case 52:
3639  if (likely((values[52] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_adjoint_sigma)) != 0)) kw_args--;
3640  else {
3641  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, 52); __PYX_ERR(1, 163, __pyx_L3_error)
3642  }
3643  }
3644  if (unlikely(kw_args > 0)) {
3645  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateResidual") < 0)) __PYX_ERR(1, 163, __pyx_L3_error)
3646  }
3647  } else if (PyTuple_GET_SIZE(__pyx_args) != 53) {
3648  goto __pyx_L5_argtuple_error;
3649  } else {
3650  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3651  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3652  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
3653  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
3654  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
3655  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
3656  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
3657  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
3658  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
3659  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
3660  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
3661  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
3662  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
3663  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
3664  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
3665  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
3666  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3667  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3668  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3669  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3670  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3671  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3672  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3673  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3674  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3675  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3676  values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3677  values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3678  values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3679  values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3680  values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3681  values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3682  values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3683  values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3684  values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3685  values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3686  values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3687  values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3688  values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3689  values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3690  values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3691  values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3692  values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3693  values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3694  values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3695  values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3696  values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3697  values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3698  values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3699  values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3700  values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3701  values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3702  values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3703  }
3704  __pyx_v_mesh_trial_ref = ((PyArrayObject *)values[0]);
3705  __pyx_v_mesh_grad_trial_ref = ((PyArrayObject *)values[1]);
3706  __pyx_v_mesh_dof = ((PyArrayObject *)values[2]);
3707  __pyx_v_mesh_l2g = ((PyArrayObject *)values[3]);
3708  __pyx_v_dV_ref = ((PyArrayObject *)values[4]);
3709  __pyx_v_u_trial_ref = ((PyArrayObject *)values[5]);
3710  __pyx_v_u_grad_trial_ref = ((PyArrayObject *)values[6]);
3711  __pyx_v_u_test_ref = ((PyArrayObject *)values[7]);
3712  __pyx_v_u_grad_test_ref = ((PyArrayObject *)values[8]);
3713  __pyx_v_elementDiameter = ((PyArrayObject *)values[9]);
3714  __pyx_v_cfl = ((PyArrayObject *)values[10]);
3715  __pyx_v_CT_sge = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_CT_sge == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L3_error)
3716  __pyx_v_sc_uref = __pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_sc_uref == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L3_error)
3717  __pyx_v_sc_alpha = __pyx_PyFloat_AsDouble(values[13]); if (unlikely((__pyx_v_sc_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L3_error)
3718  __pyx_v_useMetrics = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_useMetrics == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 178, __pyx_L3_error)
3719  __pyx_v_mesh_trial_trace_ref = ((PyArrayObject *)values[15]);
3720  __pyx_v_mesh_grad_trial_trace_ref = ((PyArrayObject *)values[16]);
3721  __pyx_v_dS_ref = ((PyArrayObject *)values[17]);
3722  __pyx_v_u_trial_trace_ref = ((PyArrayObject *)values[18]);
3723  __pyx_v_u_grad_trial_trace_ref = ((PyArrayObject *)values[19]);
3724  __pyx_v_u_test_trace_ref = ((PyArrayObject *)values[20]);
3725  __pyx_v_u_grad_test_trace_ref = ((PyArrayObject *)values[21]);
3726  __pyx_v_normal_ref = ((PyArrayObject *)values[22]);
3727  __pyx_v_boundaryJac_ref = ((PyArrayObject *)values[23]);
3728  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[24]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 188, __pyx_L3_error)
3729  __pyx_v_u_l2g = ((PyArrayObject *)values[25]);
3730  __pyx_v_u_dof = ((PyArrayObject *)values[26]);
3731  __pyx_v_sdInfo_u_u_rowptr = ((PyArrayObject *)values[27]);
3732  __pyx_v_sdInfo_u_u_colind = ((PyArrayObject *)values[28]);
3733  __pyx_v_q_a = ((PyArrayObject *)values[29]);
3734  __pyx_v_q_v = ((PyArrayObject *)values[30]);
3735  __pyx_v_q_r = ((PyArrayObject *)values[31]);
3736  __pyx_v_lag_shockCapturing = __Pyx_PyInt_As_int(values[32]); if (unlikely((__pyx_v_lag_shockCapturing == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 196, __pyx_L3_error)
3737  __pyx_v_shockCapturingDiffusion = __pyx_PyFloat_AsDouble(values[33]); if (unlikely((__pyx_v_shockCapturingDiffusion == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 197, __pyx_L3_error)
3738  __pyx_v_q_numDiff_u = ((PyArrayObject *)values[34]);
3739  __pyx_v_q_numDiff_u_last = ((PyArrayObject *)values[35]);
3740  __pyx_v_offset_u = __Pyx_PyInt_As_int(values[36]); if (unlikely((__pyx_v_offset_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 200, __pyx_L3_error)
3741  __pyx_v_stride_u = __Pyx_PyInt_As_int(values[37]); if (unlikely((__pyx_v_stride_u == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 201, __pyx_L3_error)
3742  __pyx_v_globalResidual = ((PyArrayObject *)values[38]);
3743  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[39]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L3_error)
3744  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[40]);
3745  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[41]);
3746  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[42]);
3747  __pyx_v_ebqe_a = ((PyArrayObject *)values[43]);
3748  __pyx_v_ebqe_v = ((PyArrayObject *)values[44]);
3749  __pyx_v_isDOFBoundary_u = ((PyArrayObject *)values[45]);
3750  __pyx_v_ebqe_bc_u_ext = ((PyArrayObject *)values[46]);
3751  __pyx_v_isFluxBoundary_u = ((PyArrayObject *)values[47]);
3752  __pyx_v_isAdvectiveFluxBoundary_u = ((PyArrayObject *)values[48]);
3753  __pyx_v_ebqe_bc_flux_u_ext = ((PyArrayObject *)values[49]);
3754  __pyx_v_ebqe_bc_advectiveFlux_u_ext = ((PyArrayObject *)values[50]);
3755  __pyx_v_ebqe_penalty = ((PyArrayObject *)values[51]);
3756  __pyx_v_adjoint_sigma = __pyx_PyFloat_AsDouble(values[52]); if (unlikely((__pyx_v_adjoint_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 216, __pyx_L3_error)
3757  }
3758  goto __pyx_L4_argument_unpacking_done;
3759  __pyx_L5_argtuple_error:;
3760  __Pyx_RaiseArgtupleInvalid("calculateResidual", 1, 53, 53, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 163, __pyx_L3_error)
3761  __pyx_L3_error:;
3762  __Pyx_AddTraceback("ADR.ADR.calculateResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
3763  __Pyx_RefNannyFinishContext();
3764  return NULL;
3765  __pyx_L4_argument_unpacking_done:;
3766  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_ref", 0))) __PYX_ERR(1, 164, __pyx_L1_error)
3767  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_ref", 0))) __PYX_ERR(1, 165, __pyx_L1_error)
3768  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_dof), __pyx_ptype_5numpy_ndarray, 1, "mesh_dof", 0))) __PYX_ERR(1, 166, __pyx_L1_error)
3769  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_l2g), __pyx_ptype_5numpy_ndarray, 1, "mesh_l2g", 0))) __PYX_ERR(1, 167, __pyx_L1_error)
3770  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV_ref), __pyx_ptype_5numpy_ndarray, 1, "dV_ref", 0))) __PYX_ERR(1, 168, __pyx_L1_error)
3771  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_ref", 0))) __PYX_ERR(1, 169, __pyx_L1_error)
3772  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_ref", 0))) __PYX_ERR(1, 170, __pyx_L1_error)
3773  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_ref", 0))) __PYX_ERR(1, 171, __pyx_L1_error)
3774  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_ref", 0))) __PYX_ERR(1, 172, __pyx_L1_error)
3775  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(1, 173, __pyx_L1_error)
3776  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(1, 174, __pyx_L1_error)
3777  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_trace_ref", 0))) __PYX_ERR(1, 179, __pyx_L1_error)
3778  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_trace_ref", 0))) __PYX_ERR(1, 180, __pyx_L1_error)
3779  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS_ref), __pyx_ptype_5numpy_ndarray, 1, "dS_ref", 0))) __PYX_ERR(1, 181, __pyx_L1_error)
3780  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_trace_ref", 0))) __PYX_ERR(1, 182, __pyx_L1_error)
3781  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_trace_ref", 0))) __PYX_ERR(1, 183, __pyx_L1_error)
3782  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_trace_ref", 0))) __PYX_ERR(1, 184, __pyx_L1_error)
3783  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_trace_ref", 0))) __PYX_ERR(1, 185, __pyx_L1_error)
3784  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal_ref), __pyx_ptype_5numpy_ndarray, 1, "normal_ref", 0))) __PYX_ERR(1, 186, __pyx_L1_error)
3785  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJac_ref), __pyx_ptype_5numpy_ndarray, 1, "boundaryJac_ref", 0))) __PYX_ERR(1, 187, __pyx_L1_error)
3786  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_l2g), __pyx_ptype_5numpy_ndarray, 1, "u_l2g", 0))) __PYX_ERR(1, 189, __pyx_L1_error)
3787  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_dof), __pyx_ptype_5numpy_ndarray, 1, "u_dof", 0))) __PYX_ERR(1, 190, __pyx_L1_error)
3788  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_rowptr), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_rowptr", 0))) __PYX_ERR(1, 191, __pyx_L1_error)
3789  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_colind), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_colind", 0))) __PYX_ERR(1, 192, __pyx_L1_error)
3790  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_a), __pyx_ptype_5numpy_ndarray, 1, "q_a", 0))) __PYX_ERR(1, 193, __pyx_L1_error)
3791  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_v), __pyx_ptype_5numpy_ndarray, 1, "q_v", 0))) __PYX_ERR(1, 194, __pyx_L1_error)
3792  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_r), __pyx_ptype_5numpy_ndarray, 1, "q_r", 0))) __PYX_ERR(1, 195, __pyx_L1_error)
3793  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u", 0))) __PYX_ERR(1, 198, __pyx_L1_error)
3794  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u_last), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u_last", 0))) __PYX_ERR(1, 199, __pyx_L1_error)
3795  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_globalResidual), __pyx_ptype_5numpy_ndarray, 1, "globalResidual", 0))) __PYX_ERR(1, 202, __pyx_L1_error)
3796  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(1, 204, __pyx_L1_error)
3797  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(1, 205, __pyx_L1_error)
3798  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(1, 206, __pyx_L1_error)
3799  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_a), __pyx_ptype_5numpy_ndarray, 1, "ebqe_a", 0))) __PYX_ERR(1, 207, __pyx_L1_error)
3800  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_v), __pyx_ptype_5numpy_ndarray, 1, "ebqe_v", 0))) __PYX_ERR(1, 208, __pyx_L1_error)
3801  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary_u", 0))) __PYX_ERR(1, 209, __pyx_L1_error)
3802  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_u_ext", 0))) __PYX_ERR(1, 210, __pyx_L1_error)
3803  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isFluxBoundary_u", 0))) __PYX_ERR(1, 211, __pyx_L1_error)
3804  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isAdvectiveFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isAdvectiveFluxBoundary_u", 0))) __PYX_ERR(1, 212, __pyx_L1_error)
3805  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_flux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_flux_u_ext", 0))) __PYX_ERR(1, 213, __pyx_L1_error)
3806  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_advectiveFlux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_advectiveFlux_u_ext", 0))) __PYX_ERR(1, 214, __pyx_L1_error)
3807  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_penalty), __pyx_ptype_5numpy_ndarray, 1, "ebqe_penalty", 0))) __PYX_ERR(1, 215, __pyx_L1_error)
3808  __pyx_r = __pyx_pf_3ADR_3ADR_4calculateResidual(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_mesh_trial_ref, __pyx_v_mesh_grad_trial_ref, __pyx_v_mesh_dof, __pyx_v_mesh_l2g, __pyx_v_dV_ref, __pyx_v_u_trial_ref, __pyx_v_u_grad_trial_ref, __pyx_v_u_test_ref, __pyx_v_u_grad_test_ref, __pyx_v_elementDiameter, __pyx_v_cfl, __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, __pyx_v_mesh_trial_trace_ref, __pyx_v_mesh_grad_trial_trace_ref, __pyx_v_dS_ref, __pyx_v_u_trial_trace_ref, __pyx_v_u_grad_trial_trace_ref, __pyx_v_u_test_trace_ref, __pyx_v_u_grad_test_trace_ref, __pyx_v_normal_ref, __pyx_v_boundaryJac_ref, __pyx_v_nElements_global, __pyx_v_u_l2g, __pyx_v_u_dof, __pyx_v_sdInfo_u_u_rowptr, __pyx_v_sdInfo_u_u_colind, __pyx_v_q_a, __pyx_v_q_v, __pyx_v_q_r, __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, __pyx_v_q_numDiff_u, __pyx_v_q_numDiff_u_last, __pyx_v_offset_u, __pyx_v_stride_u, __pyx_v_globalResidual, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebqe_a, __pyx_v_ebqe_v, __pyx_v_isDOFBoundary_u, __pyx_v_ebqe_bc_u_ext, __pyx_v_isFluxBoundary_u, __pyx_v_isAdvectiveFluxBoundary_u, __pyx_v_ebqe_bc_flux_u_ext, __pyx_v_ebqe_bc_advectiveFlux_u_ext, __pyx_v_ebqe_penalty, __pyx_v_adjoint_sigma);
3809 
3810  /* function exit code */
3811  goto __pyx_L0;
3812  __pyx_L1_error:;
3813  __pyx_r = NULL;
3814  __pyx_L0:;
3815  __Pyx_RefNannyFinishContext();
3816  return __pyx_r;
3817 }
3818 
3819 static PyObject *__pyx_pf_3ADR_3ADR_4calculateResidual(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, int __pyx_v_offset_u, int __pyx_v_stride_u, PyArrayObject *__pyx_v_globalResidual, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma) {
3820  PyObject *__pyx_r = NULL;
3821  __Pyx_RefNannyDeclarations
3822  __Pyx_RefNannySetupContext("calculateResidual", 0);
3823 
3824  /* "ADR.pyx":217
3825  * numpy.ndarray ebqe_penalty,
3826  * double adjoint_sigma):
3827  * self.thisptr.calculateResidual(<double*> mesh_trial_ref.data, # <<<<<<<<<<<<<<
3828  * <double*> mesh_grad_trial_ref.data,
3829  * <double*> mesh_dof.data,
3830  */
3831  __pyx_v_self->thisptr->calculateResidual(((double *)__pyx_v_mesh_trial_ref->data), ((double *)__pyx_v_mesh_grad_trial_ref->data), ((double *)__pyx_v_mesh_dof->data), ((int *)__pyx_v_mesh_l2g->data), ((double *)__pyx_v_dV_ref->data), ((double *)__pyx_v_u_trial_ref->data), ((double *)__pyx_v_u_grad_trial_ref->data), ((double *)__pyx_v_u_test_ref->data), ((double *)__pyx_v_u_grad_test_ref->data), ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_cfl->data), __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, ((double *)__pyx_v_mesh_trial_trace_ref->data), ((double *)__pyx_v_mesh_grad_trial_trace_ref->data), ((double *)__pyx_v_dS_ref->data), ((double *)__pyx_v_u_trial_trace_ref->data), ((double *)__pyx_v_u_grad_trial_trace_ref->data), ((double *)__pyx_v_u_test_trace_ref->data), ((double *)__pyx_v_u_grad_test_trace_ref->data), ((double *)__pyx_v_normal_ref->data), ((double *)__pyx_v_boundaryJac_ref->data), __pyx_v_nElements_global, ((int *)__pyx_v_u_l2g->data), ((double *)__pyx_v_u_dof->data), ((int *)__pyx_v_sdInfo_u_u_rowptr->data), ((int *)__pyx_v_sdInfo_u_u_colind->data), ((double *)__pyx_v_q_a->data), ((double *)__pyx_v_q_v->data), ((double *)__pyx_v_q_r->data), __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, ((double *)__pyx_v_q_numDiff_u->data), ((double *)__pyx_v_q_numDiff_u_last->data), __pyx_v_offset_u, __pyx_v_stride_u, ((double *)__pyx_v_globalResidual->data), __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebqe_a->data), ((double *)__pyx_v_ebqe_v->data), ((int *)__pyx_v_isDOFBoundary_u->data), ((double *)__pyx_v_ebqe_bc_u_ext->data), ((int *)__pyx_v_isFluxBoundary_u->data), ((int *)__pyx_v_isAdvectiveFluxBoundary_u->data), ((double *)__pyx_v_ebqe_bc_flux_u_ext->data), ((double *)__pyx_v_ebqe_bc_advectiveFlux_u_ext->data), ((double *)__pyx_v_ebqe_penalty->data), __pyx_v_adjoint_sigma);
3832 
3833  /* "ADR.pyx":163
3834  * def __dealloc__(self):
3835  * del self.thisptr
3836  * def calculateResidual(self, # <<<<<<<<<<<<<<
3837  * numpy.ndarray mesh_trial_ref,
3838  * numpy.ndarray mesh_grad_trial_ref,
3839  */
3840 
3841  /* function exit code */
3842  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3843  __Pyx_XGIVEREF(__pyx_r);
3844  __Pyx_RefNannyFinishContext();
3845  return __pyx_r;
3846 }
3847 
3848 /* "ADR.pyx":270
3849  * <double*> ebqe_penalty.data,
3850  * adjoint_sigma)
3851  * def calculateJacobian(self, # <<<<<<<<<<<<<<
3852  * numpy.ndarray mesh_trial_ref,
3853  * numpy.ndarray mesh_grad_trial_ref,
3854  */
3855 
3856 /* Python wrapper */
3857 static PyObject *__pyx_pw_3ADR_3ADR_7calculateJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3858 static char __pyx_doc_3ADR_3ADR_6calculateJacobian[] = "\n Optimized jacobian calculation\n ";
3859 static PyObject *__pyx_pw_3ADR_3ADR_7calculateJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3860  PyArrayObject *__pyx_v_mesh_trial_ref = 0;
3861  PyArrayObject *__pyx_v_mesh_grad_trial_ref = 0;
3862  PyArrayObject *__pyx_v_mesh_dof = 0;
3863  PyArrayObject *__pyx_v_mesh_l2g = 0;
3864  PyArrayObject *__pyx_v_dV_ref = 0;
3865  PyArrayObject *__pyx_v_u_trial_ref = 0;
3866  PyArrayObject *__pyx_v_u_grad_trial_ref = 0;
3867  PyArrayObject *__pyx_v_u_test_ref = 0;
3868  PyArrayObject *__pyx_v_u_grad_test_ref = 0;
3869  PyArrayObject *__pyx_v_elementDiameter = 0;
3870  PyArrayObject *__pyx_v_cfl = 0;
3871  double __pyx_v_CT_sge;
3872  double __pyx_v_sc_uref;
3873  double __pyx_v_sc_alpha;
3874  double __pyx_v_useMetrics;
3875  PyArrayObject *__pyx_v_mesh_trial_trace_ref = 0;
3876  PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref = 0;
3877  PyArrayObject *__pyx_v_dS_ref = 0;
3878  PyArrayObject *__pyx_v_u_trial_trace_ref = 0;
3879  PyArrayObject *__pyx_v_u_grad_trial_trace_ref = 0;
3880  PyArrayObject *__pyx_v_u_test_trace_ref = 0;
3881  PyArrayObject *__pyx_v_u_grad_test_trace_ref = 0;
3882  PyArrayObject *__pyx_v_normal_ref = 0;
3883  PyArrayObject *__pyx_v_boundaryJac_ref = 0;
3884  int __pyx_v_nElements_global;
3885  PyArrayObject *__pyx_v_u_l2g = 0;
3886  PyArrayObject *__pyx_v_u_dof = 0;
3887  PyArrayObject *__pyx_v_sdInfo_u_u_rowptr = 0;
3888  PyArrayObject *__pyx_v_sdInfo_u_u_colind = 0;
3889  PyArrayObject *__pyx_v_q_a = 0;
3890  PyArrayObject *__pyx_v_q_v = 0;
3891  PyArrayObject *__pyx_v_q_r = 0;
3892  int __pyx_v_lag_shockCapturing;
3893  double __pyx_v_shockCapturingDiffusion;
3894  PyArrayObject *__pyx_v_q_numDiff_u = 0;
3895  PyArrayObject *__pyx_v_q_numDiff_u_last = 0;
3896  PyArrayObject *__pyx_v_csrRowIndeces_u_u = 0;
3897  PyArrayObject *__pyx_v_csrColumnOffsets_u_u = 0;
3898  PyObject *__pyx_v_globalJacobian = 0;
3899  int __pyx_v_nExteriorElementBoundaries_global;
3900  PyArrayObject *__pyx_v_exteriorElementBoundariesArray = 0;
3901  PyArrayObject *__pyx_v_elementBoundaryElementsArray = 0;
3902  PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray = 0;
3903  PyArrayObject *__pyx_v_ebqe_a = 0;
3904  PyArrayObject *__pyx_v_ebqe_v = 0;
3905  PyArrayObject *__pyx_v_isDOFBoundary_u = 0;
3906  PyArrayObject *__pyx_v_ebqe_bc_u_ext = 0;
3907  PyArrayObject *__pyx_v_isFluxBoundary_u = 0;
3908  PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u = 0;
3909  PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext = 0;
3910  PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext = 0;
3911  PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u = 0;
3912  PyArrayObject *__pyx_v_ebqe_penalty = 0;
3913  double __pyx_v_adjoint_sigma;
3914  PyObject *__pyx_r = 0;
3915  __Pyx_RefNannyDeclarations
3916  __Pyx_RefNannySetupContext("calculateJacobian (wrapper)", 0);
3917  {
3918  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mesh_trial_ref,&__pyx_n_s_mesh_grad_trial_ref,&__pyx_n_s_mesh_dof,&__pyx_n_s_mesh_l2g,&__pyx_n_s_dV_ref,&__pyx_n_s_u_trial_ref,&__pyx_n_s_u_grad_trial_ref,&__pyx_n_s_u_test_ref,&__pyx_n_s_u_grad_test_ref,&__pyx_n_s_elementDiameter,&__pyx_n_s_cfl,&__pyx_n_s_CT_sge,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_alpha,&__pyx_n_s_useMetrics,&__pyx_n_s_mesh_trial_trace_ref,&__pyx_n_s_mesh_grad_trial_trace_ref,&__pyx_n_s_dS_ref,&__pyx_n_s_u_trial_trace_ref,&__pyx_n_s_u_grad_trial_trace_ref,&__pyx_n_s_u_test_trace_ref,&__pyx_n_s_u_grad_test_trace_ref,&__pyx_n_s_normal_ref,&__pyx_n_s_boundaryJac_ref,&__pyx_n_s_nElements_global,&__pyx_n_s_u_l2g,&__pyx_n_s_u_dof,&__pyx_n_s_sdInfo_u_u_rowptr,&__pyx_n_s_sdInfo_u_u_colind,&__pyx_n_s_q_a,&__pyx_n_s_q_v,&__pyx_n_s_q_r,&__pyx_n_s_lag_shockCapturing,&__pyx_n_s_shockCapturingDiffusion,&__pyx_n_s_q_numDiff_u,&__pyx_n_s_q_numDiff_u_last,&__pyx_n_s_csrRowIndeces_u_u,&__pyx_n_s_csrColumnOffsets_u_u,&__pyx_n_s_globalJacobian,&__pyx_n_s_nExteriorElementBoundaries_globa,&__pyx_n_s_exteriorElementBoundariesArray,&__pyx_n_s_elementBoundaryElementsArray,&__pyx_n_s_elementBoundaryLocalElementBound,&__pyx_n_s_ebqe_a,&__pyx_n_s_ebqe_v,&__pyx_n_s_isDOFBoundary_u,&__pyx_n_s_ebqe_bc_u_ext,&__pyx_n_s_isFluxBoundary_u,&__pyx_n_s_isAdvectiveFluxBoundary_u,&__pyx_n_s_ebqe_bc_flux_u_ext,&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext,&__pyx_n_s_csrColumnOffsets_eb_u_u,&__pyx_n_s_ebqe_penalty,&__pyx_n_s_adjoint_sigma,0};
3919  PyObject* values[54] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
3920  if (unlikely(__pyx_kwds)) {
3921  Py_ssize_t kw_args;
3922  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3923  switch (pos_args) {
3924  case 54: values[53] = PyTuple_GET_ITEM(__pyx_args, 53);
3925  CYTHON_FALLTHROUGH;
3926  case 53: values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
3927  CYTHON_FALLTHROUGH;
3928  case 52: values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
3929  CYTHON_FALLTHROUGH;
3930  case 51: values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
3931  CYTHON_FALLTHROUGH;
3932  case 50: values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
3933  CYTHON_FALLTHROUGH;
3934  case 49: values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
3935  CYTHON_FALLTHROUGH;
3936  case 48: values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
3937  CYTHON_FALLTHROUGH;
3938  case 47: values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
3939  CYTHON_FALLTHROUGH;
3940  case 46: values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
3941  CYTHON_FALLTHROUGH;
3942  case 45: values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
3943  CYTHON_FALLTHROUGH;
3944  case 44: values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
3945  CYTHON_FALLTHROUGH;
3946  case 43: values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
3947  CYTHON_FALLTHROUGH;
3948  case 42: values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
3949  CYTHON_FALLTHROUGH;
3950  case 41: values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
3951  CYTHON_FALLTHROUGH;
3952  case 40: values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
3953  CYTHON_FALLTHROUGH;
3954  case 39: values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
3955  CYTHON_FALLTHROUGH;
3956  case 38: values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
3957  CYTHON_FALLTHROUGH;
3958  case 37: values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
3959  CYTHON_FALLTHROUGH;
3960  case 36: values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
3961  CYTHON_FALLTHROUGH;
3962  case 35: values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
3963  CYTHON_FALLTHROUGH;
3964  case 34: values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
3965  CYTHON_FALLTHROUGH;
3966  case 33: values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
3967  CYTHON_FALLTHROUGH;
3968  case 32: values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
3969  CYTHON_FALLTHROUGH;
3970  case 31: values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
3971  CYTHON_FALLTHROUGH;
3972  case 30: values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
3973  CYTHON_FALLTHROUGH;
3974  case 29: values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
3975  CYTHON_FALLTHROUGH;
3976  case 28: values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
3977  CYTHON_FALLTHROUGH;
3978  case 27: values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
3979  CYTHON_FALLTHROUGH;
3980  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
3981  CYTHON_FALLTHROUGH;
3982  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
3983  CYTHON_FALLTHROUGH;
3984  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
3985  CYTHON_FALLTHROUGH;
3986  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
3987  CYTHON_FALLTHROUGH;
3988  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
3989  CYTHON_FALLTHROUGH;
3990  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
3991  CYTHON_FALLTHROUGH;
3992  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
3993  CYTHON_FALLTHROUGH;
3994  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
3995  CYTHON_FALLTHROUGH;
3996  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
3997  CYTHON_FALLTHROUGH;
3998  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
3999  CYTHON_FALLTHROUGH;
4000  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4001  CYTHON_FALLTHROUGH;
4002  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4003  CYTHON_FALLTHROUGH;
4004  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4005  CYTHON_FALLTHROUGH;
4006  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4007  CYTHON_FALLTHROUGH;
4008  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4009  CYTHON_FALLTHROUGH;
4010  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4011  CYTHON_FALLTHROUGH;
4012  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4013  CYTHON_FALLTHROUGH;
4014  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4015  CYTHON_FALLTHROUGH;
4016  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4017  CYTHON_FALLTHROUGH;
4018  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4019  CYTHON_FALLTHROUGH;
4020  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4021  CYTHON_FALLTHROUGH;
4022  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4023  CYTHON_FALLTHROUGH;
4024  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4025  CYTHON_FALLTHROUGH;
4026  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4027  CYTHON_FALLTHROUGH;
4028  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4029  CYTHON_FALLTHROUGH;
4030  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4031  CYTHON_FALLTHROUGH;
4032  case 0: break;
4033  default: goto __pyx_L5_argtuple_error;
4034  }
4035  kw_args = PyDict_Size(__pyx_kwds);
4036  switch (pos_args) {
4037  case 0:
4038  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_trial_ref)) != 0)) kw_args--;
4039  else goto __pyx_L5_argtuple_error;
4040  CYTHON_FALLTHROUGH;
4041  case 1:
4042  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_grad_trial_ref)) != 0)) kw_args--;
4043  else {
4044  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 1); __PYX_ERR(1, 270, __pyx_L3_error)
4045  }
4046  CYTHON_FALLTHROUGH;
4047  case 2:
4048  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_dof)) != 0)) kw_args--;
4049  else {
4050  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 2); __PYX_ERR(1, 270, __pyx_L3_error)
4051  }
4052  CYTHON_FALLTHROUGH;
4053  case 3:
4054  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_l2g)) != 0)) kw_args--;
4055  else {
4056  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 3); __PYX_ERR(1, 270, __pyx_L3_error)
4057  }
4058  CYTHON_FALLTHROUGH;
4059  case 4:
4060  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dV_ref)) != 0)) kw_args--;
4061  else {
4062  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 4); __PYX_ERR(1, 270, __pyx_L3_error)
4063  }
4064  CYTHON_FALLTHROUGH;
4065  case 5:
4066  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_trial_ref)) != 0)) kw_args--;
4067  else {
4068  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 5); __PYX_ERR(1, 270, __pyx_L3_error)
4069  }
4070  CYTHON_FALLTHROUGH;
4071  case 6:
4072  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_trial_ref)) != 0)) kw_args--;
4073  else {
4074  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 6); __PYX_ERR(1, 270, __pyx_L3_error)
4075  }
4076  CYTHON_FALLTHROUGH;
4077  case 7:
4078  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_test_ref)) != 0)) kw_args--;
4079  else {
4080  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 7); __PYX_ERR(1, 270, __pyx_L3_error)
4081  }
4082  CYTHON_FALLTHROUGH;
4083  case 8:
4084  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_test_ref)) != 0)) kw_args--;
4085  else {
4086  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 8); __PYX_ERR(1, 270, __pyx_L3_error)
4087  }
4088  CYTHON_FALLTHROUGH;
4089  case 9:
4090  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementDiameter)) != 0)) kw_args--;
4091  else {
4092  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 9); __PYX_ERR(1, 270, __pyx_L3_error)
4093  }
4094  CYTHON_FALLTHROUGH;
4095  case 10:
4096  if (likely((values[10] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfl)) != 0)) kw_args--;
4097  else {
4098  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 10); __PYX_ERR(1, 270, __pyx_L3_error)
4099  }
4100  CYTHON_FALLTHROUGH;
4101  case 11:
4102  if (likely((values[11] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_CT_sge)) != 0)) kw_args--;
4103  else {
4104  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 11); __PYX_ERR(1, 270, __pyx_L3_error)
4105  }
4106  CYTHON_FALLTHROUGH;
4107  case 12:
4108  if (likely((values[12] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sc_uref)) != 0)) kw_args--;
4109  else {
4110  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 12); __PYX_ERR(1, 270, __pyx_L3_error)
4111  }
4112  CYTHON_FALLTHROUGH;
4113  case 13:
4114  if (likely((values[13] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sc_alpha)) != 0)) kw_args--;
4115  else {
4116  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 13); __PYX_ERR(1, 270, __pyx_L3_error)
4117  }
4118  CYTHON_FALLTHROUGH;
4119  case 14:
4120  if (likely((values[14] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useMetrics)) != 0)) kw_args--;
4121  else {
4122  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 14); __PYX_ERR(1, 270, __pyx_L3_error)
4123  }
4124  CYTHON_FALLTHROUGH;
4125  case 15:
4126  if (likely((values[15] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_trial_trace_ref)) != 0)) kw_args--;
4127  else {
4128  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 15); __PYX_ERR(1, 270, __pyx_L3_error)
4129  }
4130  CYTHON_FALLTHROUGH;
4131  case 16:
4132  if (likely((values[16] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh_grad_trial_trace_ref)) != 0)) kw_args--;
4133  else {
4134  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 16); __PYX_ERR(1, 270, __pyx_L3_error)
4135  }
4136  CYTHON_FALLTHROUGH;
4137  case 17:
4138  if (likely((values[17] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dS_ref)) != 0)) kw_args--;
4139  else {
4140  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 17); __PYX_ERR(1, 270, __pyx_L3_error)
4141  }
4142  CYTHON_FALLTHROUGH;
4143  case 18:
4144  if (likely((values[18] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_trial_trace_ref)) != 0)) kw_args--;
4145  else {
4146  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 18); __PYX_ERR(1, 270, __pyx_L3_error)
4147  }
4148  CYTHON_FALLTHROUGH;
4149  case 19:
4150  if (likely((values[19] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_trial_trace_ref)) != 0)) kw_args--;
4151  else {
4152  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 19); __PYX_ERR(1, 270, __pyx_L3_error)
4153  }
4154  CYTHON_FALLTHROUGH;
4155  case 20:
4156  if (likely((values[20] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_test_trace_ref)) != 0)) kw_args--;
4157  else {
4158  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 20); __PYX_ERR(1, 270, __pyx_L3_error)
4159  }
4160  CYTHON_FALLTHROUGH;
4161  case 21:
4162  if (likely((values[21] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_grad_test_trace_ref)) != 0)) kw_args--;
4163  else {
4164  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 21); __PYX_ERR(1, 270, __pyx_L3_error)
4165  }
4166  CYTHON_FALLTHROUGH;
4167  case 22:
4168  if (likely((values[22] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal_ref)) != 0)) kw_args--;
4169  else {
4170  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 22); __PYX_ERR(1, 270, __pyx_L3_error)
4171  }
4172  CYTHON_FALLTHROUGH;
4173  case 23:
4174  if (likely((values[23] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_boundaryJac_ref)) != 0)) kw_args--;
4175  else {
4176  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 23); __PYX_ERR(1, 270, __pyx_L3_error)
4177  }
4178  CYTHON_FALLTHROUGH;
4179  case 24:
4180  if (likely((values[24] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
4181  else {
4182  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 24); __PYX_ERR(1, 270, __pyx_L3_error)
4183  }
4184  CYTHON_FALLTHROUGH;
4185  case 25:
4186  if (likely((values[25] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_l2g)) != 0)) kw_args--;
4187  else {
4188  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 25); __PYX_ERR(1, 270, __pyx_L3_error)
4189  }
4190  CYTHON_FALLTHROUGH;
4191  case 26:
4192  if (likely((values[26] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u_dof)) != 0)) kw_args--;
4193  else {
4194  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 26); __PYX_ERR(1, 270, __pyx_L3_error)
4195  }
4196  CYTHON_FALLTHROUGH;
4197  case 27:
4198  if (likely((values[27] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sdInfo_u_u_rowptr)) != 0)) kw_args--;
4199  else {
4200  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 27); __PYX_ERR(1, 270, __pyx_L3_error)
4201  }
4202  CYTHON_FALLTHROUGH;
4203  case 28:
4204  if (likely((values[28] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sdInfo_u_u_colind)) != 0)) kw_args--;
4205  else {
4206  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 28); __PYX_ERR(1, 270, __pyx_L3_error)
4207  }
4208  CYTHON_FALLTHROUGH;
4209  case 29:
4210  if (likely((values[29] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_a)) != 0)) kw_args--;
4211  else {
4212  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 29); __PYX_ERR(1, 270, __pyx_L3_error)
4213  }
4214  CYTHON_FALLTHROUGH;
4215  case 30:
4216  if (likely((values[30] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_v)) != 0)) kw_args--;
4217  else {
4218  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 30); __PYX_ERR(1, 270, __pyx_L3_error)
4219  }
4220  CYTHON_FALLTHROUGH;
4221  case 31:
4222  if (likely((values[31] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_r)) != 0)) kw_args--;
4223  else {
4224  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 31); __PYX_ERR(1, 270, __pyx_L3_error)
4225  }
4226  CYTHON_FALLTHROUGH;
4227  case 32:
4228  if (likely((values[32] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lag_shockCapturing)) != 0)) kw_args--;
4229  else {
4230  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 32); __PYX_ERR(1, 270, __pyx_L3_error)
4231  }
4232  CYTHON_FALLTHROUGH;
4233  case 33:
4234  if (likely((values[33] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shockCapturingDiffusion)) != 0)) kw_args--;
4235  else {
4236  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 33); __PYX_ERR(1, 270, __pyx_L3_error)
4237  }
4238  CYTHON_FALLTHROUGH;
4239  case 34:
4240  if (likely((values[34] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_numDiff_u)) != 0)) kw_args--;
4241  else {
4242  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 34); __PYX_ERR(1, 270, __pyx_L3_error)
4243  }
4244  CYTHON_FALLTHROUGH;
4245  case 35:
4246  if (likely((values[35] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q_numDiff_u_last)) != 0)) kw_args--;
4247  else {
4248  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 35); __PYX_ERR(1, 270, __pyx_L3_error)
4249  }
4250  CYTHON_FALLTHROUGH;
4251  case 36:
4252  if (likely((values[36] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrRowIndeces_u_u)) != 0)) kw_args--;
4253  else {
4254  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 36); __PYX_ERR(1, 270, __pyx_L3_error)
4255  }
4256  CYTHON_FALLTHROUGH;
4257  case 37:
4258  if (likely((values[37] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_u_u)) != 0)) kw_args--;
4259  else {
4260  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 37); __PYX_ERR(1, 270, __pyx_L3_error)
4261  }
4262  CYTHON_FALLTHROUGH;
4263  case 38:
4264  if (likely((values[38] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_globalJacobian)) != 0)) kw_args--;
4265  else {
4266  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 38); __PYX_ERR(1, 270, __pyx_L3_error)
4267  }
4268  CYTHON_FALLTHROUGH;
4269  case 39:
4270  if (likely((values[39] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nExteriorElementBoundaries_globa)) != 0)) kw_args--;
4271  else {
4272  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 39); __PYX_ERR(1, 270, __pyx_L3_error)
4273  }
4274  CYTHON_FALLTHROUGH;
4275  case 40:
4276  if (likely((values[40] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exteriorElementBoundariesArray)) != 0)) kw_args--;
4277  else {
4278  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 40); __PYX_ERR(1, 270, __pyx_L3_error)
4279  }
4280  CYTHON_FALLTHROUGH;
4281  case 41:
4282  if (likely((values[41] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryElementsArray)) != 0)) kw_args--;
4283  else {
4284  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 41); __PYX_ERR(1, 270, __pyx_L3_error)
4285  }
4286  CYTHON_FALLTHROUGH;
4287  case 42:
4288  if (likely((values[42] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryLocalElementBound)) != 0)) kw_args--;
4289  else {
4290  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 42); __PYX_ERR(1, 270, __pyx_L3_error)
4291  }
4292  CYTHON_FALLTHROUGH;
4293  case 43:
4294  if (likely((values[43] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_a)) != 0)) kw_args--;
4295  else {
4296  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 43); __PYX_ERR(1, 270, __pyx_L3_error)
4297  }
4298  CYTHON_FALLTHROUGH;
4299  case 44:
4300  if (likely((values[44] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_v)) != 0)) kw_args--;
4301  else {
4302  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 44); __PYX_ERR(1, 270, __pyx_L3_error)
4303  }
4304  CYTHON_FALLTHROUGH;
4305  case 45:
4306  if (likely((values[45] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isDOFBoundary_u)) != 0)) kw_args--;
4307  else {
4308  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 45); __PYX_ERR(1, 270, __pyx_L3_error)
4309  }
4310  CYTHON_FALLTHROUGH;
4311  case 46:
4312  if (likely((values[46] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_bc_u_ext)) != 0)) kw_args--;
4313  else {
4314  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 46); __PYX_ERR(1, 270, __pyx_L3_error)
4315  }
4316  CYTHON_FALLTHROUGH;
4317  case 47:
4318  if (likely((values[47] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isFluxBoundary_u)) != 0)) kw_args--;
4319  else {
4320  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 47); __PYX_ERR(1, 270, __pyx_L3_error)
4321  }
4322  CYTHON_FALLTHROUGH;
4323  case 48:
4324  if (likely((values[48] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_isAdvectiveFluxBoundary_u)) != 0)) kw_args--;
4325  else {
4326  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 48); __PYX_ERR(1, 270, __pyx_L3_error)
4327  }
4328  CYTHON_FALLTHROUGH;
4329  case 49:
4330  if (likely((values[49] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_bc_flux_u_ext)) != 0)) kw_args--;
4331  else {
4332  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 49); __PYX_ERR(1, 270, __pyx_L3_error)
4333  }
4334  CYTHON_FALLTHROUGH;
4335  case 50:
4336  if (likely((values[50] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_bc_advectiveFlux_u_ext)) != 0)) kw_args--;
4337  else {
4338  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 50); __PYX_ERR(1, 270, __pyx_L3_error)
4339  }
4340  CYTHON_FALLTHROUGH;
4341  case 51:
4342  if (likely((values[51] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_csrColumnOffsets_eb_u_u)) != 0)) kw_args--;
4343  else {
4344  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 51); __PYX_ERR(1, 270, __pyx_L3_error)
4345  }
4346  CYTHON_FALLTHROUGH;
4347  case 52:
4348  if (likely((values[52] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ebqe_penalty)) != 0)) kw_args--;
4349  else {
4350  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 52); __PYX_ERR(1, 270, __pyx_L3_error)
4351  }
4352  CYTHON_FALLTHROUGH;
4353  case 53:
4354  if (likely((values[53] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_adjoint_sigma)) != 0)) kw_args--;
4355  else {
4356  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, 53); __PYX_ERR(1, 270, __pyx_L3_error)
4357  }
4358  }
4359  if (unlikely(kw_args > 0)) {
4360  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateJacobian") < 0)) __PYX_ERR(1, 270, __pyx_L3_error)
4361  }
4362  } else if (PyTuple_GET_SIZE(__pyx_args) != 54) {
4363  goto __pyx_L5_argtuple_error;
4364  } else {
4365  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4366  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4367  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4368  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4369  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4370  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4371  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4372  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4373  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4374  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
4375  values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
4376  values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
4377  values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
4378  values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
4379  values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
4380  values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
4381  values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
4382  values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
4383  values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
4384  values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
4385  values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
4386  values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
4387  values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
4388  values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
4389  values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
4390  values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
4391  values[26] = PyTuple_GET_ITEM(__pyx_args, 26);
4392  values[27] = PyTuple_GET_ITEM(__pyx_args, 27);
4393  values[28] = PyTuple_GET_ITEM(__pyx_args, 28);
4394  values[29] = PyTuple_GET_ITEM(__pyx_args, 29);
4395  values[30] = PyTuple_GET_ITEM(__pyx_args, 30);
4396  values[31] = PyTuple_GET_ITEM(__pyx_args, 31);
4397  values[32] = PyTuple_GET_ITEM(__pyx_args, 32);
4398  values[33] = PyTuple_GET_ITEM(__pyx_args, 33);
4399  values[34] = PyTuple_GET_ITEM(__pyx_args, 34);
4400  values[35] = PyTuple_GET_ITEM(__pyx_args, 35);
4401  values[36] = PyTuple_GET_ITEM(__pyx_args, 36);
4402  values[37] = PyTuple_GET_ITEM(__pyx_args, 37);
4403  values[38] = PyTuple_GET_ITEM(__pyx_args, 38);
4404  values[39] = PyTuple_GET_ITEM(__pyx_args, 39);
4405  values[40] = PyTuple_GET_ITEM(__pyx_args, 40);
4406  values[41] = PyTuple_GET_ITEM(__pyx_args, 41);
4407  values[42] = PyTuple_GET_ITEM(__pyx_args, 42);
4408  values[43] = PyTuple_GET_ITEM(__pyx_args, 43);
4409  values[44] = PyTuple_GET_ITEM(__pyx_args, 44);
4410  values[45] = PyTuple_GET_ITEM(__pyx_args, 45);
4411  values[46] = PyTuple_GET_ITEM(__pyx_args, 46);
4412  values[47] = PyTuple_GET_ITEM(__pyx_args, 47);
4413  values[48] = PyTuple_GET_ITEM(__pyx_args, 48);
4414  values[49] = PyTuple_GET_ITEM(__pyx_args, 49);
4415  values[50] = PyTuple_GET_ITEM(__pyx_args, 50);
4416  values[51] = PyTuple_GET_ITEM(__pyx_args, 51);
4417  values[52] = PyTuple_GET_ITEM(__pyx_args, 52);
4418  values[53] = PyTuple_GET_ITEM(__pyx_args, 53);
4419  }
4420  __pyx_v_mesh_trial_ref = ((PyArrayObject *)values[0]);
4421  __pyx_v_mesh_grad_trial_ref = ((PyArrayObject *)values[1]);
4422  __pyx_v_mesh_dof = ((PyArrayObject *)values[2]);
4423  __pyx_v_mesh_l2g = ((PyArrayObject *)values[3]);
4424  __pyx_v_dV_ref = ((PyArrayObject *)values[4]);
4425  __pyx_v_u_trial_ref = ((PyArrayObject *)values[5]);
4426  __pyx_v_u_grad_trial_ref = ((PyArrayObject *)values[6]);
4427  __pyx_v_u_test_ref = ((PyArrayObject *)values[7]);
4428  __pyx_v_u_grad_test_ref = ((PyArrayObject *)values[8]);
4429  __pyx_v_elementDiameter = ((PyArrayObject *)values[9]);
4430  __pyx_v_cfl = ((PyArrayObject *)values[10]);
4431  __pyx_v_CT_sge = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_CT_sge == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 282, __pyx_L3_error)
4432  __pyx_v_sc_uref = __pyx_PyFloat_AsDouble(values[12]); if (unlikely((__pyx_v_sc_uref == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 283, __pyx_L3_error)
4433  __pyx_v_sc_alpha = __pyx_PyFloat_AsDouble(values[13]); if (unlikely((__pyx_v_sc_alpha == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 284, __pyx_L3_error)
4434  __pyx_v_useMetrics = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_useMetrics == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 285, __pyx_L3_error)
4435  __pyx_v_mesh_trial_trace_ref = ((PyArrayObject *)values[15]);
4436  __pyx_v_mesh_grad_trial_trace_ref = ((PyArrayObject *)values[16]);
4437  __pyx_v_dS_ref = ((PyArrayObject *)values[17]);
4438  __pyx_v_u_trial_trace_ref = ((PyArrayObject *)values[18]);
4439  __pyx_v_u_grad_trial_trace_ref = ((PyArrayObject *)values[19]);
4440  __pyx_v_u_test_trace_ref = ((PyArrayObject *)values[20]);
4441  __pyx_v_u_grad_test_trace_ref = ((PyArrayObject *)values[21]);
4442  __pyx_v_normal_ref = ((PyArrayObject *)values[22]);
4443  __pyx_v_boundaryJac_ref = ((PyArrayObject *)values[23]);
4444  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[24]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L3_error)
4445  __pyx_v_u_l2g = ((PyArrayObject *)values[25]);
4446  __pyx_v_u_dof = ((PyArrayObject *)values[26]);
4447  __pyx_v_sdInfo_u_u_rowptr = ((PyArrayObject *)values[27]);
4448  __pyx_v_sdInfo_u_u_colind = ((PyArrayObject *)values[28]);
4449  __pyx_v_q_a = ((PyArrayObject *)values[29]);
4450  __pyx_v_q_v = ((PyArrayObject *)values[30]);
4451  __pyx_v_q_r = ((PyArrayObject *)values[31]);
4452  __pyx_v_lag_shockCapturing = __Pyx_PyInt_As_int(values[32]); if (unlikely((__pyx_v_lag_shockCapturing == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 303, __pyx_L3_error)
4453  __pyx_v_shockCapturingDiffusion = __pyx_PyFloat_AsDouble(values[33]); if (unlikely((__pyx_v_shockCapturingDiffusion == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error)
4454  __pyx_v_q_numDiff_u = ((PyArrayObject *)values[34]);
4455  __pyx_v_q_numDiff_u_last = ((PyArrayObject *)values[35]);
4456  __pyx_v_csrRowIndeces_u_u = ((PyArrayObject *)values[36]);
4457  __pyx_v_csrColumnOffsets_u_u = ((PyArrayObject *)values[37]);
4458  __pyx_v_globalJacobian = values[38];
4459  __pyx_v_nExteriorElementBoundaries_global = __Pyx_PyInt_As_int(values[39]); if (unlikely((__pyx_v_nExteriorElementBoundaries_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 310, __pyx_L3_error)
4460  __pyx_v_exteriorElementBoundariesArray = ((PyArrayObject *)values[40]);
4461  __pyx_v_elementBoundaryElementsArray = ((PyArrayObject *)values[41]);
4462  __pyx_v_elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)values[42]);
4463  __pyx_v_ebqe_a = ((PyArrayObject *)values[43]);
4464  __pyx_v_ebqe_v = ((PyArrayObject *)values[44]);
4465  __pyx_v_isDOFBoundary_u = ((PyArrayObject *)values[45]);
4466  __pyx_v_ebqe_bc_u_ext = ((PyArrayObject *)values[46]);
4467  __pyx_v_isFluxBoundary_u = ((PyArrayObject *)values[47]);
4468  __pyx_v_isAdvectiveFluxBoundary_u = ((PyArrayObject *)values[48]);
4469  __pyx_v_ebqe_bc_flux_u_ext = ((PyArrayObject *)values[49]);
4470  __pyx_v_ebqe_bc_advectiveFlux_u_ext = ((PyArrayObject *)values[50]);
4471  __pyx_v_csrColumnOffsets_eb_u_u = ((PyArrayObject *)values[51]);
4472  __pyx_v_ebqe_penalty = ((PyArrayObject *)values[52]);
4473  __pyx_v_adjoint_sigma = __pyx_PyFloat_AsDouble(values[53]); if (unlikely((__pyx_v_adjoint_sigma == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 324, __pyx_L3_error)
4474  }
4475  goto __pyx_L4_argument_unpacking_done;
4476  __pyx_L5_argtuple_error:;
4477  __Pyx_RaiseArgtupleInvalid("calculateJacobian", 1, 54, 54, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 270, __pyx_L3_error)
4478  __pyx_L3_error:;
4479  __Pyx_AddTraceback("ADR.ADR.calculateJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
4480  __Pyx_RefNannyFinishContext();
4481  return NULL;
4482  __pyx_L4_argument_unpacking_done:;
4483  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_ref", 0))) __PYX_ERR(1, 271, __pyx_L1_error)
4484  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_ref", 0))) __PYX_ERR(1, 272, __pyx_L1_error)
4485  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_dof), __pyx_ptype_5numpy_ndarray, 1, "mesh_dof", 0))) __PYX_ERR(1, 273, __pyx_L1_error)
4486  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_l2g), __pyx_ptype_5numpy_ndarray, 1, "mesh_l2g", 0))) __PYX_ERR(1, 274, __pyx_L1_error)
4487  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dV_ref), __pyx_ptype_5numpy_ndarray, 1, "dV_ref", 0))) __PYX_ERR(1, 275, __pyx_L1_error)
4488  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_ref", 0))) __PYX_ERR(1, 276, __pyx_L1_error)
4489  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_ref", 0))) __PYX_ERR(1, 277, __pyx_L1_error)
4490  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_ref", 0))) __PYX_ERR(1, 278, __pyx_L1_error)
4491  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_ref", 0))) __PYX_ERR(1, 279, __pyx_L1_error)
4492  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementDiameter), __pyx_ptype_5numpy_ndarray, 1, "elementDiameter", 0))) __PYX_ERR(1, 280, __pyx_L1_error)
4493  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfl), __pyx_ptype_5numpy_ndarray, 1, "cfl", 0))) __PYX_ERR(1, 281, __pyx_L1_error)
4494  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_trial_trace_ref", 0))) __PYX_ERR(1, 286, __pyx_L1_error)
4495  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "mesh_grad_trial_trace_ref", 0))) __PYX_ERR(1, 287, __pyx_L1_error)
4496  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dS_ref), __pyx_ptype_5numpy_ndarray, 1, "dS_ref", 0))) __PYX_ERR(1, 288, __pyx_L1_error)
4497  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_trial_trace_ref", 0))) __PYX_ERR(1, 289, __pyx_L1_error)
4498  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_trial_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_trial_trace_ref", 0))) __PYX_ERR(1, 290, __pyx_L1_error)
4499  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_test_trace_ref", 0))) __PYX_ERR(1, 291, __pyx_L1_error)
4500  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_grad_test_trace_ref), __pyx_ptype_5numpy_ndarray, 1, "u_grad_test_trace_ref", 0))) __PYX_ERR(1, 292, __pyx_L1_error)
4501  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_normal_ref), __pyx_ptype_5numpy_ndarray, 1, "normal_ref", 0))) __PYX_ERR(1, 293, __pyx_L1_error)
4502  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_boundaryJac_ref), __pyx_ptype_5numpy_ndarray, 1, "boundaryJac_ref", 0))) __PYX_ERR(1, 294, __pyx_L1_error)
4503  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_l2g), __pyx_ptype_5numpy_ndarray, 1, "u_l2g", 0))) __PYX_ERR(1, 296, __pyx_L1_error)
4504  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u_dof), __pyx_ptype_5numpy_ndarray, 1, "u_dof", 0))) __PYX_ERR(1, 297, __pyx_L1_error)
4505  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_rowptr), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_rowptr", 0))) __PYX_ERR(1, 298, __pyx_L1_error)
4506  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sdInfo_u_u_colind), __pyx_ptype_5numpy_ndarray, 1, "sdInfo_u_u_colind", 0))) __PYX_ERR(1, 299, __pyx_L1_error)
4507  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_a), __pyx_ptype_5numpy_ndarray, 1, "q_a", 0))) __PYX_ERR(1, 300, __pyx_L1_error)
4508  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_v), __pyx_ptype_5numpy_ndarray, 1, "q_v", 0))) __PYX_ERR(1, 301, __pyx_L1_error)
4509  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_r), __pyx_ptype_5numpy_ndarray, 1, "q_r", 0))) __PYX_ERR(1, 302, __pyx_L1_error)
4510  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u", 0))) __PYX_ERR(1, 305, __pyx_L1_error)
4511  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_q_numDiff_u_last), __pyx_ptype_5numpy_ndarray, 1, "q_numDiff_u_last", 0))) __PYX_ERR(1, 306, __pyx_L1_error)
4512  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrRowIndeces_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrRowIndeces_u_u", 0))) __PYX_ERR(1, 307, __pyx_L1_error)
4513  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_u_u", 0))) __PYX_ERR(1, 308, __pyx_L1_error)
4514  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_exteriorElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "exteriorElementBoundariesArray", 0))) __PYX_ERR(1, 311, __pyx_L1_error)
4515  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryElementsArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryElementsArray", 0))) __PYX_ERR(1, 312, __pyx_L1_error)
4516  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementBoundaryLocalElementBoundariesArray), __pyx_ptype_5numpy_ndarray, 1, "elementBoundaryLocalElementBoundariesArray", 0))) __PYX_ERR(1, 313, __pyx_L1_error)
4517  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_a), __pyx_ptype_5numpy_ndarray, 1, "ebqe_a", 0))) __PYX_ERR(1, 314, __pyx_L1_error)
4518  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_v), __pyx_ptype_5numpy_ndarray, 1, "ebqe_v", 0))) __PYX_ERR(1, 315, __pyx_L1_error)
4519  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isDOFBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isDOFBoundary_u", 0))) __PYX_ERR(1, 316, __pyx_L1_error)
4520  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_u_ext", 0))) __PYX_ERR(1, 317, __pyx_L1_error)
4521  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isFluxBoundary_u", 0))) __PYX_ERR(1, 318, __pyx_L1_error)
4522  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isAdvectiveFluxBoundary_u), __pyx_ptype_5numpy_ndarray, 1, "isAdvectiveFluxBoundary_u", 0))) __PYX_ERR(1, 319, __pyx_L1_error)
4523  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_flux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_flux_u_ext", 0))) __PYX_ERR(1, 320, __pyx_L1_error)
4524  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_bc_advectiveFlux_u_ext), __pyx_ptype_5numpy_ndarray, 1, "ebqe_bc_advectiveFlux_u_ext", 0))) __PYX_ERR(1, 321, __pyx_L1_error)
4525  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_csrColumnOffsets_eb_u_u), __pyx_ptype_5numpy_ndarray, 1, "csrColumnOffsets_eb_u_u", 0))) __PYX_ERR(1, 322, __pyx_L1_error)
4526  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ebqe_penalty), __pyx_ptype_5numpy_ndarray, 1, "ebqe_penalty", 0))) __PYX_ERR(1, 323, __pyx_L1_error)
4527  __pyx_r = __pyx_pf_3ADR_3ADR_6calculateJacobian(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), __pyx_v_mesh_trial_ref, __pyx_v_mesh_grad_trial_ref, __pyx_v_mesh_dof, __pyx_v_mesh_l2g, __pyx_v_dV_ref, __pyx_v_u_trial_ref, __pyx_v_u_grad_trial_ref, __pyx_v_u_test_ref, __pyx_v_u_grad_test_ref, __pyx_v_elementDiameter, __pyx_v_cfl, __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, __pyx_v_mesh_trial_trace_ref, __pyx_v_mesh_grad_trial_trace_ref, __pyx_v_dS_ref, __pyx_v_u_trial_trace_ref, __pyx_v_u_grad_trial_trace_ref, __pyx_v_u_test_trace_ref, __pyx_v_u_grad_test_trace_ref, __pyx_v_normal_ref, __pyx_v_boundaryJac_ref, __pyx_v_nElements_global, __pyx_v_u_l2g, __pyx_v_u_dof, __pyx_v_sdInfo_u_u_rowptr, __pyx_v_sdInfo_u_u_colind, __pyx_v_q_a, __pyx_v_q_v, __pyx_v_q_r, __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, __pyx_v_q_numDiff_u, __pyx_v_q_numDiff_u_last, __pyx_v_csrRowIndeces_u_u, __pyx_v_csrColumnOffsets_u_u, __pyx_v_globalJacobian, __pyx_v_nExteriorElementBoundaries_global, __pyx_v_exteriorElementBoundariesArray, __pyx_v_elementBoundaryElementsArray, __pyx_v_elementBoundaryLocalElementBoundariesArray, __pyx_v_ebqe_a, __pyx_v_ebqe_v, __pyx_v_isDOFBoundary_u, __pyx_v_ebqe_bc_u_ext, __pyx_v_isFluxBoundary_u, __pyx_v_isAdvectiveFluxBoundary_u, __pyx_v_ebqe_bc_flux_u_ext, __pyx_v_ebqe_bc_advectiveFlux_u_ext, __pyx_v_csrColumnOffsets_eb_u_u, __pyx_v_ebqe_penalty, __pyx_v_adjoint_sigma);
4528 
4529  /* function exit code */
4530  goto __pyx_L0;
4531  __pyx_L1_error:;
4532  __pyx_r = NULL;
4533  __pyx_L0:;
4534  __Pyx_RefNannyFinishContext();
4535  return __pyx_r;
4536 }
4537 
4538 static PyObject *__pyx_pf_3ADR_3ADR_6calculateJacobian(struct __pyx_obj_3ADR_ADR *__pyx_v_self, PyArrayObject *__pyx_v_mesh_trial_ref, PyArrayObject *__pyx_v_mesh_grad_trial_ref, PyArrayObject *__pyx_v_mesh_dof, PyArrayObject *__pyx_v_mesh_l2g, PyArrayObject *__pyx_v_dV_ref, PyArrayObject *__pyx_v_u_trial_ref, PyArrayObject *__pyx_v_u_grad_trial_ref, PyArrayObject *__pyx_v_u_test_ref, PyArrayObject *__pyx_v_u_grad_test_ref, PyArrayObject *__pyx_v_elementDiameter, PyArrayObject *__pyx_v_cfl, double __pyx_v_CT_sge, double __pyx_v_sc_uref, double __pyx_v_sc_alpha, double __pyx_v_useMetrics, PyArrayObject *__pyx_v_mesh_trial_trace_ref, PyArrayObject *__pyx_v_mesh_grad_trial_trace_ref, PyArrayObject *__pyx_v_dS_ref, PyArrayObject *__pyx_v_u_trial_trace_ref, PyArrayObject *__pyx_v_u_grad_trial_trace_ref, PyArrayObject *__pyx_v_u_test_trace_ref, PyArrayObject *__pyx_v_u_grad_test_trace_ref, PyArrayObject *__pyx_v_normal_ref, PyArrayObject *__pyx_v_boundaryJac_ref, int __pyx_v_nElements_global, PyArrayObject *__pyx_v_u_l2g, PyArrayObject *__pyx_v_u_dof, PyArrayObject *__pyx_v_sdInfo_u_u_rowptr, PyArrayObject *__pyx_v_sdInfo_u_u_colind, PyArrayObject *__pyx_v_q_a, PyArrayObject *__pyx_v_q_v, PyArrayObject *__pyx_v_q_r, int __pyx_v_lag_shockCapturing, double __pyx_v_shockCapturingDiffusion, PyArrayObject *__pyx_v_q_numDiff_u, PyArrayObject *__pyx_v_q_numDiff_u_last, PyArrayObject *__pyx_v_csrRowIndeces_u_u, PyArrayObject *__pyx_v_csrColumnOffsets_u_u, PyObject *__pyx_v_globalJacobian, int __pyx_v_nExteriorElementBoundaries_global, PyArrayObject *__pyx_v_exteriorElementBoundariesArray, PyArrayObject *__pyx_v_elementBoundaryElementsArray, PyArrayObject *__pyx_v_elementBoundaryLocalElementBoundariesArray, PyArrayObject *__pyx_v_ebqe_a, PyArrayObject *__pyx_v_ebqe_v, PyArrayObject *__pyx_v_isDOFBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_u_ext, PyArrayObject *__pyx_v_isFluxBoundary_u, PyArrayObject *__pyx_v_isAdvectiveFluxBoundary_u, PyArrayObject *__pyx_v_ebqe_bc_flux_u_ext, PyArrayObject *__pyx_v_ebqe_bc_advectiveFlux_u_ext, PyArrayObject *__pyx_v_csrColumnOffsets_eb_u_u, PyArrayObject *__pyx_v_ebqe_penalty, double __pyx_v_adjoint_sigma) {
4539  CYTHON_UNUSED PyArrayObject *__pyx_v_rowptr = 0;
4540  CYTHON_UNUSED PyArrayObject *__pyx_v_colind = 0;
4541  PyArrayObject *__pyx_v_globalJacobian_a = 0;
4542  PyObject *__pyx_r = NULL;
4543  __Pyx_RefNannyDeclarations
4544  PyObject *__pyx_t_1 = NULL;
4545  PyObject *__pyx_t_2 = NULL;
4546  PyObject *__pyx_t_3 = NULL;
4547  PyObject *__pyx_t_4 = NULL;
4548  PyObject *__pyx_t_5 = NULL;
4549  PyObject *(*__pyx_t_6)(PyObject *);
4550  __Pyx_RefNannySetupContext("calculateJacobian", 0);
4551 
4552  /* "ADR.pyx":329
4553  * """
4554  * cdef numpy.ndarray rowptr,colind,globalJacobian_a
4555  * (rowptr,colind,globalJacobian_a) = globalJacobian.getCSRrepresentation() # <<<<<<<<<<<<<<
4556  * self.thisptr.calculateJacobian(<double*> mesh_trial_ref.data,
4557  * <double*> mesh_grad_trial_ref.data,
4558  */
4559  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_globalJacobian, __pyx_n_s_getCSRrepresentation); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 329, __pyx_L1_error)
4560  __Pyx_GOTREF(__pyx_t_2);
4561  __pyx_t_3 = NULL;
4562  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4563  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4564  if (likely(__pyx_t_3)) {
4565  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4566  __Pyx_INCREF(__pyx_t_3);
4567  __Pyx_INCREF(function);
4568  __Pyx_DECREF_SET(__pyx_t_2, function);
4569  }
4570  }
4571  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4572  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4573  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 329, __pyx_L1_error)
4574  __Pyx_GOTREF(__pyx_t_1);
4575  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4576  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
4577  PyObject* sequence = __pyx_t_1;
4578  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
4579  if (unlikely(size != 3)) {
4580  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
4581  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
4582  __PYX_ERR(1, 329, __pyx_L1_error)
4583  }
4584  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4585  if (likely(PyTuple_CheckExact(sequence))) {
4586  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
4587  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
4588  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
4589  } else {
4590  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
4591  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
4592  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
4593  }
4594  __Pyx_INCREF(__pyx_t_2);
4595  __Pyx_INCREF(__pyx_t_3);
4596  __Pyx_INCREF(__pyx_t_4);
4597  #else
4598  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 329, __pyx_L1_error)
4599  __Pyx_GOTREF(__pyx_t_2);
4600  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 329, __pyx_L1_error)
4601  __Pyx_GOTREF(__pyx_t_3);
4602  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 329, __pyx_L1_error)
4603  __Pyx_GOTREF(__pyx_t_4);
4604  #endif
4605  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4606  } else {
4607  Py_ssize_t index = -1;
4608  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 329, __pyx_L1_error)
4609  __Pyx_GOTREF(__pyx_t_5);
4610  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4611  __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
4612  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
4613  __Pyx_GOTREF(__pyx_t_2);
4614  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
4615  __Pyx_GOTREF(__pyx_t_3);
4616  index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
4617  __Pyx_GOTREF(__pyx_t_4);
4618  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(1, 329, __pyx_L1_error)
4619  __pyx_t_6 = NULL;
4620  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4621  goto __pyx_L4_unpacking_done;
4622  __pyx_L3_unpacking_failed:;
4623  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4624  __pyx_t_6 = NULL;
4625  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
4626  __PYX_ERR(1, 329, __pyx_L1_error)
4627  __pyx_L4_unpacking_done:;
4628  }
4629  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 329, __pyx_L1_error)
4630  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 329, __pyx_L1_error)
4631  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 329, __pyx_L1_error)
4632  __pyx_v_rowptr = ((PyArrayObject *)__pyx_t_2);
4633  __pyx_t_2 = 0;
4634  __pyx_v_colind = ((PyArrayObject *)__pyx_t_3);
4635  __pyx_t_3 = 0;
4636  __pyx_v_globalJacobian_a = ((PyArrayObject *)__pyx_t_4);
4637  __pyx_t_4 = 0;
4638 
4639  /* "ADR.pyx":330
4640  * cdef numpy.ndarray rowptr,colind,globalJacobian_a
4641  * (rowptr,colind,globalJacobian_a) = globalJacobian.getCSRrepresentation()
4642  * self.thisptr.calculateJacobian(<double*> mesh_trial_ref.data, # <<<<<<<<<<<<<<
4643  * <double*> mesh_grad_trial_ref.data,
4644  * <double*> mesh_dof.data,
4645  */
4646  __pyx_v_self->thisptr->calculateJacobian(((double *)__pyx_v_mesh_trial_ref->data), ((double *)__pyx_v_mesh_grad_trial_ref->data), ((double *)__pyx_v_mesh_dof->data), ((int *)__pyx_v_mesh_l2g->data), ((double *)__pyx_v_dV_ref->data), ((double *)__pyx_v_u_trial_ref->data), ((double *)__pyx_v_u_grad_trial_ref->data), ((double *)__pyx_v_u_test_ref->data), ((double *)__pyx_v_u_grad_test_ref->data), ((double *)__pyx_v_elementDiameter->data), ((double *)__pyx_v_cfl->data), __pyx_v_CT_sge, __pyx_v_sc_uref, __pyx_v_sc_alpha, __pyx_v_useMetrics, ((double *)__pyx_v_mesh_trial_trace_ref->data), ((double *)__pyx_v_mesh_grad_trial_trace_ref->data), ((double *)__pyx_v_dS_ref->data), ((double *)__pyx_v_u_trial_trace_ref->data), ((double *)__pyx_v_u_grad_trial_trace_ref->data), ((double *)__pyx_v_u_test_trace_ref->data), ((double *)__pyx_v_u_grad_test_trace_ref->data), ((double *)__pyx_v_normal_ref->data), ((double *)__pyx_v_boundaryJac_ref->data), __pyx_v_nElements_global, ((int *)__pyx_v_u_l2g->data), ((double *)__pyx_v_u_dof->data), ((int *)__pyx_v_sdInfo_u_u_rowptr->data), ((int *)__pyx_v_sdInfo_u_u_colind->data), ((double *)__pyx_v_q_a->data), ((double *)__pyx_v_q_v->data), ((double *)__pyx_v_q_r->data), __pyx_v_lag_shockCapturing, __pyx_v_shockCapturingDiffusion, ((double *)__pyx_v_q_numDiff_u->data), ((double *)__pyx_v_q_numDiff_u_last->data), ((int *)__pyx_v_csrRowIndeces_u_u->data), ((int *)__pyx_v_csrColumnOffsets_u_u->data), ((double *)__pyx_v_globalJacobian_a->data), __pyx_v_nExteriorElementBoundaries_global, ((int *)__pyx_v_exteriorElementBoundariesArray->data), ((int *)__pyx_v_elementBoundaryElementsArray->data), ((int *)__pyx_v_elementBoundaryLocalElementBoundariesArray->data), ((double *)__pyx_v_ebqe_a->data), ((double *)__pyx_v_ebqe_v->data), ((int *)__pyx_v_isDOFBoundary_u->data), ((double *)__pyx_v_ebqe_bc_u_ext->data), ((int *)__pyx_v_isFluxBoundary_u->data), ((int *)__pyx_v_isAdvectiveFluxBoundary_u->data), ((double *)__pyx_v_ebqe_bc_flux_u_ext->data), ((double *)__pyx_v_ebqe_bc_advectiveFlux_u_ext->data), ((int *)__pyx_v_csrColumnOffsets_eb_u_u->data), ((double *)__pyx_v_ebqe_penalty->data), __pyx_v_adjoint_sigma);
4647 
4648  /* "ADR.pyx":270
4649  * <double*> ebqe_penalty.data,
4650  * adjoint_sigma)
4651  * def calculateJacobian(self, # <<<<<<<<<<<<<<
4652  * numpy.ndarray mesh_trial_ref,
4653  * numpy.ndarray mesh_grad_trial_ref,
4654  */
4655 
4656  /* function exit code */
4657  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4658  goto __pyx_L0;
4659  __pyx_L1_error:;
4660  __Pyx_XDECREF(__pyx_t_1);
4661  __Pyx_XDECREF(__pyx_t_2);
4662  __Pyx_XDECREF(__pyx_t_3);
4663  __Pyx_XDECREF(__pyx_t_4);
4664  __Pyx_XDECREF(__pyx_t_5);
4665  __Pyx_AddTraceback("ADR.ADR.calculateJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
4666  __pyx_r = NULL;
4667  __pyx_L0:;
4668  __Pyx_XDECREF((PyObject *)__pyx_v_rowptr);
4669  __Pyx_XDECREF((PyObject *)__pyx_v_colind);
4670  __Pyx_XDECREF((PyObject *)__pyx_v_globalJacobian_a);
4671  __Pyx_XGIVEREF(__pyx_r);
4672  __Pyx_RefNannyFinishContext();
4673  return __pyx_r;
4674 }
4675 
4676 /* "(tree fragment)":1
4677  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4678  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4679  * def __setstate_cython__(self, __pyx_state):
4680  */
4681 
4682 /* Python wrapper */
4683 static PyObject *__pyx_pw_3ADR_3ADR_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4684 static PyObject *__pyx_pw_3ADR_3ADR_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4685  PyObject *__pyx_r = 0;
4686  __Pyx_RefNannyDeclarations
4687  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
4688  __pyx_r = __pyx_pf_3ADR_3ADR_8__reduce_cython__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self));
4689 
4690  /* function exit code */
4691  __Pyx_RefNannyFinishContext();
4692  return __pyx_r;
4693 }
4694 
4695 static PyObject *__pyx_pf_3ADR_3ADR_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3ADR_ADR *__pyx_v_self) {
4696  PyObject *__pyx_r = NULL;
4697  __Pyx_RefNannyDeclarations
4698  PyObject *__pyx_t_1 = NULL;
4699  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
4700 
4701  /* "(tree fragment)":2
4702  * def __reduce_cython__(self):
4703  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
4704  * def __setstate_cython__(self, __pyx_state):
4705  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4706  */
4707  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
4708  __Pyx_GOTREF(__pyx_t_1);
4709  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4710  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4711  __PYX_ERR(0, 2, __pyx_L1_error)
4712 
4713  /* "(tree fragment)":1
4714  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
4715  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4716  * def __setstate_cython__(self, __pyx_state):
4717  */
4718 
4719  /* function exit code */
4720  __pyx_L1_error:;
4721  __Pyx_XDECREF(__pyx_t_1);
4722  __Pyx_AddTraceback("ADR.ADR.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4723  __pyx_r = NULL;
4724  __Pyx_XGIVEREF(__pyx_r);
4725  __Pyx_RefNannyFinishContext();
4726  return __pyx_r;
4727 }
4728 
4729 /* "(tree fragment)":3
4730  * def __reduce_cython__(self):
4731  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4732  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4733  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4734  */
4735 
4736 /* Python wrapper */
4737 static PyObject *__pyx_pw_3ADR_3ADR_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
4738 static PyObject *__pyx_pw_3ADR_3ADR_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
4739  PyObject *__pyx_r = 0;
4740  __Pyx_RefNannyDeclarations
4741  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
4742  __pyx_r = __pyx_pf_3ADR_3ADR_10__setstate_cython__(((struct __pyx_obj_3ADR_ADR *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
4743 
4744  /* function exit code */
4745  __Pyx_RefNannyFinishContext();
4746  return __pyx_r;
4747 }
4748 
4749 static PyObject *__pyx_pf_3ADR_3ADR_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3ADR_ADR *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
4750  PyObject *__pyx_r = NULL;
4751  __Pyx_RefNannyDeclarations
4752  PyObject *__pyx_t_1 = NULL;
4753  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
4754 
4755  /* "(tree fragment)":4
4756  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4757  * def __setstate_cython__(self, __pyx_state):
4758  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
4759  */
4760  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
4761  __Pyx_GOTREF(__pyx_t_1);
4762  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
4763  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4764  __PYX_ERR(0, 4, __pyx_L1_error)
4765 
4766  /* "(tree fragment)":3
4767  * def __reduce_cython__(self):
4768  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4769  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
4770  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
4771  */
4772 
4773  /* function exit code */
4774  __pyx_L1_error:;
4775  __Pyx_XDECREF(__pyx_t_1);
4776  __Pyx_AddTraceback("ADR.ADR.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4777  __pyx_r = NULL;
4778  __Pyx_XGIVEREF(__pyx_r);
4779  __Pyx_RefNannyFinishContext();
4780  return __pyx_r;
4781 }
4782 
4783 /* "ADR.pyx":394
4784  * """
4785  *
4786  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
4787  * SGE_base.__init__(self,coefficients,nd,lag=False)
4788  * def initializeElementQuadrature(self,mesh,t,cq):
4789  */
4790 
4791 /* Python wrapper */
4792 static PyObject *__pyx_pw_3ADR_12SubgridError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4793 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12SubgridError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
4794 static PyObject *__pyx_pw_3ADR_12SubgridError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4795  PyObject *__pyx_v_self = 0;
4796  PyObject *__pyx_v_coefficients = 0;
4797  PyObject *__pyx_v_nd = 0;
4798  PyObject *__pyx_r = 0;
4799  __Pyx_RefNannyDeclarations
4800  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4801  {
4802  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_coefficients,&__pyx_n_s_nd,0};
4803  PyObject* values[3] = {0,0,0};
4804  if (unlikely(__pyx_kwds)) {
4805  Py_ssize_t kw_args;
4806  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4807  switch (pos_args) {
4808  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4809  CYTHON_FALLTHROUGH;
4810  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4811  CYTHON_FALLTHROUGH;
4812  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4813  CYTHON_FALLTHROUGH;
4814  case 0: break;
4815  default: goto __pyx_L5_argtuple_error;
4816  }
4817  kw_args = PyDict_Size(__pyx_kwds);
4818  switch (pos_args) {
4819  case 0:
4820  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4821  else goto __pyx_L5_argtuple_error;
4822  CYTHON_FALLTHROUGH;
4823  case 1:
4824  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
4825  else {
4826  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(1, 394, __pyx_L3_error)
4827  }
4828  CYTHON_FALLTHROUGH;
4829  case 2:
4830  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nd)) != 0)) kw_args--;
4831  else {
4832  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(1, 394, __pyx_L3_error)
4833  }
4834  }
4835  if (unlikely(kw_args > 0)) {
4836  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 394, __pyx_L3_error)
4837  }
4838  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
4839  goto __pyx_L5_argtuple_error;
4840  } else {
4841  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4842  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4843  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4844  }
4845  __pyx_v_self = values[0];
4846  __pyx_v_coefficients = values[1];
4847  __pyx_v_nd = values[2];
4848  }
4849  goto __pyx_L4_argument_unpacking_done;
4850  __pyx_L5_argtuple_error:;
4851  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 394, __pyx_L3_error)
4852  __pyx_L3_error:;
4853  __Pyx_AddTraceback("ADR.SubgridError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4854  __Pyx_RefNannyFinishContext();
4855  return NULL;
4856  __pyx_L4_argument_unpacking_done:;
4857  __pyx_r = __pyx_pf_3ADR_12SubgridError___init__(__pyx_self, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd);
4858 
4859  /* function exit code */
4860  __Pyx_RefNannyFinishContext();
4861  return __pyx_r;
4862 }
4863 
4864 static PyObject *__pyx_pf_3ADR_12SubgridError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd) {
4865  PyObject *__pyx_r = NULL;
4866  __Pyx_RefNannyDeclarations
4867  PyObject *__pyx_t_1 = NULL;
4868  PyObject *__pyx_t_2 = NULL;
4869  PyObject *__pyx_t_3 = NULL;
4870  PyObject *__pyx_t_4 = NULL;
4871  __Pyx_RefNannySetupContext("__init__", 0);
4872 
4873  /* "ADR.pyx":395
4874  *
4875  * def __init__(self,coefficients,nd):
4876  * SGE_base.__init__(self,coefficients,nd,lag=False) # <<<<<<<<<<<<<<
4877  * def initializeElementQuadrature(self,mesh,t,cq):
4878  * pass
4879  */
4880  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SGE_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 395, __pyx_L1_error)
4881  __Pyx_GOTREF(__pyx_t_1);
4882  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 395, __pyx_L1_error)
4883  __Pyx_GOTREF(__pyx_t_2);
4884  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4885  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 395, __pyx_L1_error)
4886  __Pyx_GOTREF(__pyx_t_1);
4887  __Pyx_INCREF(__pyx_v_self);
4888  __Pyx_GIVEREF(__pyx_v_self);
4889  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
4890  __Pyx_INCREF(__pyx_v_coefficients);
4891  __Pyx_GIVEREF(__pyx_v_coefficients);
4892  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_coefficients);
4893  __Pyx_INCREF(__pyx_v_nd);
4894  __Pyx_GIVEREF(__pyx_v_nd);
4895  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nd);
4896  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 395, __pyx_L1_error)
4897  __Pyx_GOTREF(__pyx_t_3);
4898  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_lag, Py_False) < 0) __PYX_ERR(1, 395, __pyx_L1_error)
4899  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 395, __pyx_L1_error)
4900  __Pyx_GOTREF(__pyx_t_4);
4901  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4902  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4903  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4904  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4905 
4906  /* "ADR.pyx":394
4907  * """
4908  *
4909  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
4910  * SGE_base.__init__(self,coefficients,nd,lag=False)
4911  * def initializeElementQuadrature(self,mesh,t,cq):
4912  */
4913 
4914  /* function exit code */
4915  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4916  goto __pyx_L0;
4917  __pyx_L1_error:;
4918  __Pyx_XDECREF(__pyx_t_1);
4919  __Pyx_XDECREF(__pyx_t_2);
4920  __Pyx_XDECREF(__pyx_t_3);
4921  __Pyx_XDECREF(__pyx_t_4);
4922  __Pyx_AddTraceback("ADR.SubgridError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4923  __pyx_r = NULL;
4924  __pyx_L0:;
4925  __Pyx_XGIVEREF(__pyx_r);
4926  __Pyx_RefNannyFinishContext();
4927  return __pyx_r;
4928 }
4929 
4930 /* "ADR.pyx":396
4931  * def __init__(self,coefficients,nd):
4932  * SGE_base.__init__(self,coefficients,nd,lag=False)
4933  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
4934  * pass
4935  * def updateSubgridErrorHistory(self,initializationPhase=False):
4936  */
4937 
4938 /* Python wrapper */
4939 static PyObject *__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4940 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
4941 static PyObject *__pyx_pw_3ADR_12SubgridError_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4942  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
4943  CYTHON_UNUSED PyObject *__pyx_v_mesh = 0;
4944  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
4945  CYTHON_UNUSED PyObject *__pyx_v_cq = 0;
4946  PyObject *__pyx_r = 0;
4947  __Pyx_RefNannyDeclarations
4948  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
4949  {
4950  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mesh,&__pyx_n_s_t,&__pyx_n_s_cq,0};
4951  PyObject* values[4] = {0,0,0,0};
4952  if (unlikely(__pyx_kwds)) {
4953  Py_ssize_t kw_args;
4954  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4955  switch (pos_args) {
4956  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4957  CYTHON_FALLTHROUGH;
4958  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4959  CYTHON_FALLTHROUGH;
4960  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4961  CYTHON_FALLTHROUGH;
4962  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4963  CYTHON_FALLTHROUGH;
4964  case 0: break;
4965  default: goto __pyx_L5_argtuple_error;
4966  }
4967  kw_args = PyDict_Size(__pyx_kwds);
4968  switch (pos_args) {
4969  case 0:
4970  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
4971  else goto __pyx_L5_argtuple_error;
4972  CYTHON_FALLTHROUGH;
4973  case 1:
4974  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
4975  else {
4976  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 1); __PYX_ERR(1, 396, __pyx_L3_error)
4977  }
4978  CYTHON_FALLTHROUGH;
4979  case 2:
4980  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
4981  else {
4982  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 2); __PYX_ERR(1, 396, __pyx_L3_error)
4983  }
4984  CYTHON_FALLTHROUGH;
4985  case 3:
4986  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
4987  else {
4988  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 3); __PYX_ERR(1, 396, __pyx_L3_error)
4989  }
4990  }
4991  if (unlikely(kw_args > 0)) {
4992  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(1, 396, __pyx_L3_error)
4993  }
4994  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
4995  goto __pyx_L5_argtuple_error;
4996  } else {
4997  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4998  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4999  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5000  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5001  }
5002  __pyx_v_self = values[0];
5003  __pyx_v_mesh = values[1];
5004  __pyx_v_t = values[2];
5005  __pyx_v_cq = values[3];
5006  }
5007  goto __pyx_L4_argument_unpacking_done;
5008  __pyx_L5_argtuple_error:;
5009  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 396, __pyx_L3_error)
5010  __pyx_L3_error:;
5011  __Pyx_AddTraceback("ADR.SubgridError.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
5012  __Pyx_RefNannyFinishContext();
5013  return NULL;
5014  __pyx_L4_argument_unpacking_done:;
5015  __pyx_r = __pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_mesh, __pyx_v_t, __pyx_v_cq);
5016 
5017  /* function exit code */
5018  __Pyx_RefNannyFinishContext();
5019  return __pyx_r;
5020 }
5021 
5022 static PyObject *__pyx_pf_3ADR_12SubgridError_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, CYTHON_UNUSED PyObject *__pyx_v_cq) {
5023  PyObject *__pyx_r = NULL;
5024  __Pyx_RefNannyDeclarations
5025  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
5026 
5027  /* function exit code */
5028  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5029  __Pyx_XGIVEREF(__pyx_r);
5030  __Pyx_RefNannyFinishContext();
5031  return __pyx_r;
5032 }
5033 
5034 /* "ADR.pyx":398
5035  * def initializeElementQuadrature(self,mesh,t,cq):
5036  * pass
5037  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
5038  * pass
5039  * def calculateSubgridError(self,q):
5040  */
5041 
5042 /* Python wrapper */
5043 static PyObject *__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5044 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_5updateSubgridErrorHistory = {"updateSubgridErrorHistory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory, METH_VARARGS|METH_KEYWORDS, 0};
5045 static PyObject *__pyx_pw_3ADR_12SubgridError_5updateSubgridErrorHistory(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5046  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
5047  CYTHON_UNUSED PyObject *__pyx_v_initializationPhase = 0;
5048  PyObject *__pyx_r = 0;
5049  __Pyx_RefNannyDeclarations
5050  __Pyx_RefNannySetupContext("updateSubgridErrorHistory (wrapper)", 0);
5051  {
5052  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_initializationPhase,0};
5053  PyObject* values[2] = {0,0};
5054  values[1] = ((PyObject *)((PyObject *)Py_False));
5055  if (unlikely(__pyx_kwds)) {
5056  Py_ssize_t kw_args;
5057  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5058  switch (pos_args) {
5059  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5060  CYTHON_FALLTHROUGH;
5061  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5062  CYTHON_FALLTHROUGH;
5063  case 0: break;
5064  default: goto __pyx_L5_argtuple_error;
5065  }
5066  kw_args = PyDict_Size(__pyx_kwds);
5067  switch (pos_args) {
5068  case 0:
5069  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5070  else goto __pyx_L5_argtuple_error;
5071  CYTHON_FALLTHROUGH;
5072  case 1:
5073  if (kw_args > 0) {
5074  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initializationPhase);
5075  if (value) { values[1] = value; kw_args--; }
5076  }
5077  }
5078  if (unlikely(kw_args > 0)) {
5079  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateSubgridErrorHistory") < 0)) __PYX_ERR(1, 398, __pyx_L3_error)
5080  }
5081  } else {
5082  switch (PyTuple_GET_SIZE(__pyx_args)) {
5083  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5084  CYTHON_FALLTHROUGH;
5085  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5086  break;
5087  default: goto __pyx_L5_argtuple_error;
5088  }
5089  }
5090  __pyx_v_self = values[0];
5091  __pyx_v_initializationPhase = values[1];
5092  }
5093  goto __pyx_L4_argument_unpacking_done;
5094  __pyx_L5_argtuple_error:;
5095  __Pyx_RaiseArgtupleInvalid("updateSubgridErrorHistory", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 398, __pyx_L3_error)
5096  __pyx_L3_error:;
5097  __Pyx_AddTraceback("ADR.SubgridError.updateSubgridErrorHistory", __pyx_clineno, __pyx_lineno, __pyx_filename);
5098  __Pyx_RefNannyFinishContext();
5099  return NULL;
5100  __pyx_L4_argument_unpacking_done:;
5101  __pyx_r = __pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(__pyx_self, __pyx_v_self, __pyx_v_initializationPhase);
5102 
5103  /* function exit code */
5104  __Pyx_RefNannyFinishContext();
5105  return __pyx_r;
5106 }
5107 
5108 static PyObject *__pyx_pf_3ADR_12SubgridError_4updateSubgridErrorHistory(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_initializationPhase) {
5109  PyObject *__pyx_r = NULL;
5110  __Pyx_RefNannyDeclarations
5111  __Pyx_RefNannySetupContext("updateSubgridErrorHistory", 0);
5112 
5113  /* function exit code */
5114  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5115  __Pyx_XGIVEREF(__pyx_r);
5116  __Pyx_RefNannyFinishContext();
5117  return __pyx_r;
5118 }
5119 
5120 /* "ADR.pyx":400
5121  * def updateSubgridErrorHistory(self,initializationPhase=False):
5122  * pass
5123  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
5124  * pass
5125  *
5126  */
5127 
5128 /* Python wrapper */
5129 static PyObject *__pyx_pw_3ADR_12SubgridError_7calculateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5130 static PyMethodDef __pyx_mdef_3ADR_12SubgridError_7calculateSubgridError = {"calculateSubgridError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12SubgridError_7calculateSubgridError, METH_VARARGS|METH_KEYWORDS, 0};
5131 static PyObject *__pyx_pw_3ADR_12SubgridError_7calculateSubgridError(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5132  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
5133  CYTHON_UNUSED PyObject *__pyx_v_q = 0;
5134  PyObject *__pyx_r = 0;
5135  __Pyx_RefNannyDeclarations
5136  __Pyx_RefNannySetupContext("calculateSubgridError (wrapper)", 0);
5137  {
5138  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_q,0};
5139  PyObject* values[2] = {0,0};
5140  if (unlikely(__pyx_kwds)) {
5141  Py_ssize_t kw_args;
5142  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5143  switch (pos_args) {
5144  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5145  CYTHON_FALLTHROUGH;
5146  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5147  CYTHON_FALLTHROUGH;
5148  case 0: break;
5149  default: goto __pyx_L5_argtuple_error;
5150  }
5151  kw_args = PyDict_Size(__pyx_kwds);
5152  switch (pos_args) {
5153  case 0:
5154  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5155  else goto __pyx_L5_argtuple_error;
5156  CYTHON_FALLTHROUGH;
5157  case 1:
5158  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
5159  else {
5160  __Pyx_RaiseArgtupleInvalid("calculateSubgridError", 1, 2, 2, 1); __PYX_ERR(1, 400, __pyx_L3_error)
5161  }
5162  }
5163  if (unlikely(kw_args > 0)) {
5164  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculateSubgridError") < 0)) __PYX_ERR(1, 400, __pyx_L3_error)
5165  }
5166  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5167  goto __pyx_L5_argtuple_error;
5168  } else {
5169  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5170  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5171  }
5172  __pyx_v_self = values[0];
5173  __pyx_v_q = values[1];
5174  }
5175  goto __pyx_L4_argument_unpacking_done;
5176  __pyx_L5_argtuple_error:;
5177  __Pyx_RaiseArgtupleInvalid("calculateSubgridError", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 400, __pyx_L3_error)
5178  __pyx_L3_error:;
5179  __Pyx_AddTraceback("ADR.SubgridError.calculateSubgridError", __pyx_clineno, __pyx_lineno, __pyx_filename);
5180  __Pyx_RefNannyFinishContext();
5181  return NULL;
5182  __pyx_L4_argument_unpacking_done:;
5183  __pyx_r = __pyx_pf_3ADR_12SubgridError_6calculateSubgridError(__pyx_self, __pyx_v_self, __pyx_v_q);
5184 
5185  /* function exit code */
5186  __Pyx_RefNannyFinishContext();
5187  return __pyx_r;
5188 }
5189 
5190 static PyObject *__pyx_pf_3ADR_12SubgridError_6calculateSubgridError(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_q) {
5191  PyObject *__pyx_r = NULL;
5192  __Pyx_RefNannyDeclarations
5193  __Pyx_RefNannySetupContext("calculateSubgridError", 0);
5194 
5195  /* function exit code */
5196  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5197  __Pyx_XGIVEREF(__pyx_r);
5198  __Pyx_RefNannyFinishContext();
5199  return __pyx_r;
5200 }
5201 
5202 /* "ADR.pyx":410
5203  * :parts: 2
5204  * """
5205  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
5206  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
5207  * self.nStepsToDelay = nStepsToDelay
5208  */
5209 
5210 /* Python wrapper */
5211 static PyObject *__pyx_pw_3ADR_14ShockCapturing_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5212 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_14ShockCapturing_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
5213 static PyObject *__pyx_pw_3ADR_14ShockCapturing_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5214  PyObject *__pyx_v_self = 0;
5215  PyObject *__pyx_v_coefficients = 0;
5216  PyObject *__pyx_v_nd = 0;
5217  PyObject *__pyx_v_shockCapturingFactor = 0;
5218  PyObject *__pyx_v_lag = 0;
5219  PyObject *__pyx_v_nStepsToDelay = 0;
5220  PyObject *__pyx_r = 0;
5221  __Pyx_RefNannyDeclarations
5222  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
5223  {
5224  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_coefficients,&__pyx_n_s_nd,&__pyx_n_s_shockCapturingFactor,&__pyx_n_s_lag,&__pyx_n_s_nStepsToDelay,0};
5225  PyObject* values[6] = {0,0,0,0,0,0};
5226  values[3] = ((PyObject *)((PyObject*)__pyx_float_0_25));
5227  values[4] = ((PyObject *)((PyObject *)Py_True));
5228  values[5] = ((PyObject *)((PyObject *)Py_None));
5229  if (unlikely(__pyx_kwds)) {
5230  Py_ssize_t kw_args;
5231  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5232  switch (pos_args) {
5233  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5234  CYTHON_FALLTHROUGH;
5235  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5236  CYTHON_FALLTHROUGH;
5237  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5238  CYTHON_FALLTHROUGH;
5239  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5240  CYTHON_FALLTHROUGH;
5241  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5242  CYTHON_FALLTHROUGH;
5243  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5244  CYTHON_FALLTHROUGH;
5245  case 0: break;
5246  default: goto __pyx_L5_argtuple_error;
5247  }
5248  kw_args = PyDict_Size(__pyx_kwds);
5249  switch (pos_args) {
5250  case 0:
5251  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5252  else goto __pyx_L5_argtuple_error;
5253  CYTHON_FALLTHROUGH;
5254  case 1:
5255  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
5256  else {
5257  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, 1); __PYX_ERR(1, 410, __pyx_L3_error)
5258  }
5259  CYTHON_FALLTHROUGH;
5260  case 2:
5261  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nd)) != 0)) kw_args--;
5262  else {
5263  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, 2); __PYX_ERR(1, 410, __pyx_L3_error)
5264  }
5265  CYTHON_FALLTHROUGH;
5266  case 3:
5267  if (kw_args > 0) {
5268  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shockCapturingFactor);
5269  if (value) { values[3] = value; kw_args--; }
5270  }
5271  CYTHON_FALLTHROUGH;
5272  case 4:
5273  if (kw_args > 0) {
5274  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lag);
5275  if (value) { values[4] = value; kw_args--; }
5276  }
5277  CYTHON_FALLTHROUGH;
5278  case 5:
5279  if (kw_args > 0) {
5280  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nStepsToDelay);
5281  if (value) { values[5] = value; kw_args--; }
5282  }
5283  }
5284  if (unlikely(kw_args > 0)) {
5285  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 410, __pyx_L3_error)
5286  }
5287  } else {
5288  switch (PyTuple_GET_SIZE(__pyx_args)) {
5289  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
5290  CYTHON_FALLTHROUGH;
5291  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
5292  CYTHON_FALLTHROUGH;
5293  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5294  CYTHON_FALLTHROUGH;
5295  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5296  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5297  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5298  break;
5299  default: goto __pyx_L5_argtuple_error;
5300  }
5301  }
5302  __pyx_v_self = values[0];
5303  __pyx_v_coefficients = values[1];
5304  __pyx_v_nd = values[2];
5305  __pyx_v_shockCapturingFactor = values[3];
5306  __pyx_v_lag = values[4];
5307  __pyx_v_nStepsToDelay = values[5];
5308  }
5309  goto __pyx_L4_argument_unpacking_done;
5310  __pyx_L5_argtuple_error:;
5311  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 410, __pyx_L3_error)
5312  __pyx_L3_error:;
5313  __Pyx_AddTraceback("ADR.ShockCapturing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5314  __Pyx_RefNannyFinishContext();
5315  return NULL;
5316  __pyx_L4_argument_unpacking_done:;
5317  __pyx_r = __pyx_pf_3ADR_14ShockCapturing___init__(__pyx_self, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag, __pyx_v_nStepsToDelay);
5318 
5319  /* function exit code */
5320  __Pyx_RefNannyFinishContext();
5321  return __pyx_r;
5322 }
5323 
5324 static PyObject *__pyx_pf_3ADR_14ShockCapturing___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_nd, PyObject *__pyx_v_shockCapturingFactor, PyObject *__pyx_v_lag, PyObject *__pyx_v_nStepsToDelay) {
5325  PyObject *__pyx_r = NULL;
5326  __Pyx_RefNannyDeclarations
5327  PyObject *__pyx_t_1 = NULL;
5328  PyObject *__pyx_t_2 = NULL;
5329  PyObject *__pyx_t_3 = NULL;
5330  int __pyx_t_4;
5331  PyObject *__pyx_t_5 = NULL;
5332  int __pyx_t_6;
5333  __Pyx_RefNannySetupContext("__init__", 0);
5334 
5335  /* "ADR.pyx":411
5336  * """
5337  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None):
5338  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag) # <<<<<<<<<<<<<<
5339  * self.nStepsToDelay = nStepsToDelay
5340  * self.nSteps=0
5341  */
5342  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
5343  __Pyx_GOTREF(__pyx_t_2);
5344  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
5345  __Pyx_GOTREF(__pyx_t_3);
5346  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5347  __pyx_t_2 = NULL;
5348  __pyx_t_4 = 0;
5349  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5350  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
5351  if (likely(__pyx_t_2)) {
5352  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5353  __Pyx_INCREF(__pyx_t_2);
5354  __Pyx_INCREF(function);
5355  __Pyx_DECREF_SET(__pyx_t_3, function);
5356  __pyx_t_4 = 1;
5357  }
5358  }
5359  #if CYTHON_FAST_PYCALL
5360  if (PyFunction_Check(__pyx_t_3)) {
5361  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag};
5362  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error)
5363  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5364  __Pyx_GOTREF(__pyx_t_1);
5365  } else
5366  #endif
5367  #if CYTHON_FAST_PYCCALL
5368  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5369  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_coefficients, __pyx_v_nd, __pyx_v_shockCapturingFactor, __pyx_v_lag};
5370  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error)
5371  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5372  __Pyx_GOTREF(__pyx_t_1);
5373  } else
5374  #endif
5375  {
5376  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 411, __pyx_L1_error)
5377  __Pyx_GOTREF(__pyx_t_5);
5378  if (__pyx_t_2) {
5379  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
5380  }
5381  __Pyx_INCREF(__pyx_v_self);
5382  __Pyx_GIVEREF(__pyx_v_self);
5383  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
5384  __Pyx_INCREF(__pyx_v_coefficients);
5385  __Pyx_GIVEREF(__pyx_v_coefficients);
5386  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_coefficients);
5387  __Pyx_INCREF(__pyx_v_nd);
5388  __Pyx_GIVEREF(__pyx_v_nd);
5389  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_nd);
5390  __Pyx_INCREF(__pyx_v_shockCapturingFactor);
5391  __Pyx_GIVEREF(__pyx_v_shockCapturingFactor);
5392  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_shockCapturingFactor);
5393  __Pyx_INCREF(__pyx_v_lag);
5394  __Pyx_GIVEREF(__pyx_v_lag);
5395  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_lag);
5396  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error)
5397  __Pyx_GOTREF(__pyx_t_1);
5398  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5399  }
5400  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5401  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5402 
5403  /* "ADR.pyx":412
5404  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None):
5405  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
5406  * self.nStepsToDelay = nStepsToDelay # <<<<<<<<<<<<<<
5407  * self.nSteps=0
5408  * if self.lag:
5409  */
5410  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay, __pyx_v_nStepsToDelay) < 0) __PYX_ERR(1, 412, __pyx_L1_error)
5411 
5412  /* "ADR.pyx":413
5413  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
5414  * self.nStepsToDelay = nStepsToDelay
5415  * self.nSteps=0 # <<<<<<<<<<<<<<
5416  * if self.lag:
5417  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
5418  */
5419  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSteps, __pyx_int_0) < 0) __PYX_ERR(1, 413, __pyx_L1_error)
5420 
5421  /* "ADR.pyx":414
5422  * self.nStepsToDelay = nStepsToDelay
5423  * self.nSteps=0
5424  * if self.lag: # <<<<<<<<<<<<<<
5425  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
5426  * self.nStepsToDelay=1
5427  */
5428  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 414, __pyx_L1_error)
5429  __Pyx_GOTREF(__pyx_t_1);
5430  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 414, __pyx_L1_error)
5431  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5432  if (__pyx_t_6) {
5433 
5434  /* "ADR.pyx":415
5435  * self.nSteps=0
5436  * if self.lag:
5437  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying") # <<<<<<<<<<<<<<
5438  * self.nStepsToDelay=1
5439  * self.lag=False
5440  */
5441  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 415, __pyx_L1_error)
5442  __Pyx_GOTREF(__pyx_t_3);
5443  __pyx_t_5 = NULL;
5444  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5445  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
5446  if (likely(__pyx_t_5)) {
5447  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5448  __Pyx_INCREF(__pyx_t_5);
5449  __Pyx_INCREF(function);
5450  __Pyx_DECREF_SET(__pyx_t_3, function);
5451  }
5452  }
5453  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_s_ADR_ShockCapturing_lagging_reque) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_ADR_ShockCapturing_lagging_reque);
5454  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5455  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error)
5456  __Pyx_GOTREF(__pyx_t_1);
5457  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5458  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5459 
5460  /* "ADR.pyx":416
5461  * if self.lag:
5462  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
5463  * self.nStepsToDelay=1 # <<<<<<<<<<<<<<
5464  * self.lag=False
5465  * def initializeElementQuadrature(self,mesh,t,cq):
5466  */
5467  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay, __pyx_int_1) < 0) __PYX_ERR(1, 416, __pyx_L1_error)
5468 
5469  /* "ADR.pyx":417
5470  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
5471  * self.nStepsToDelay=1
5472  * self.lag=False # <<<<<<<<<<<<<<
5473  * def initializeElementQuadrature(self,mesh,t,cq):
5474  * self.mesh=mesh
5475  */
5476  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lag, Py_False) < 0) __PYX_ERR(1, 417, __pyx_L1_error)
5477 
5478  /* "ADR.pyx":414
5479  * self.nStepsToDelay = nStepsToDelay
5480  * self.nSteps=0
5481  * if self.lag: # <<<<<<<<<<<<<<
5482  * log("ADR.ShockCapturing: lagging requested but must lag the first step; switching lagging off and delaying")
5483  * self.nStepsToDelay=1
5484  */
5485  }
5486 
5487  /* "ADR.pyx":410
5488  * :parts: 2
5489  * """
5490  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
5491  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
5492  * self.nStepsToDelay = nStepsToDelay
5493  */
5494 
5495  /* function exit code */
5496  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5497  goto __pyx_L0;
5498  __pyx_L1_error:;
5499  __Pyx_XDECREF(__pyx_t_1);
5500  __Pyx_XDECREF(__pyx_t_2);
5501  __Pyx_XDECREF(__pyx_t_3);
5502  __Pyx_XDECREF(__pyx_t_5);
5503  __Pyx_AddTraceback("ADR.ShockCapturing.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5504  __pyx_r = NULL;
5505  __pyx_L0:;
5506  __Pyx_XGIVEREF(__pyx_r);
5507  __Pyx_RefNannyFinishContext();
5508  return __pyx_r;
5509 }
5510 
5511 /* "ADR.pyx":418
5512  * self.nStepsToDelay=1
5513  * self.lag=False
5514  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
5515  * self.mesh=mesh
5516  * self.numDiff=[]
5517  */
5518 
5519 /* Python wrapper */
5520 static PyObject *__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5521 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
5522 static PyObject *__pyx_pw_3ADR_14ShockCapturing_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5523  PyObject *__pyx_v_self = 0;
5524  PyObject *__pyx_v_mesh = 0;
5525  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
5526  PyObject *__pyx_v_cq = 0;
5527  PyObject *__pyx_r = 0;
5528  __Pyx_RefNannyDeclarations
5529  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
5530  {
5531  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mesh,&__pyx_n_s_t,&__pyx_n_s_cq,0};
5532  PyObject* values[4] = {0,0,0,0};
5533  if (unlikely(__pyx_kwds)) {
5534  Py_ssize_t kw_args;
5535  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5536  switch (pos_args) {
5537  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5538  CYTHON_FALLTHROUGH;
5539  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5540  CYTHON_FALLTHROUGH;
5541  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5542  CYTHON_FALLTHROUGH;
5543  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5544  CYTHON_FALLTHROUGH;
5545  case 0: break;
5546  default: goto __pyx_L5_argtuple_error;
5547  }
5548  kw_args = PyDict_Size(__pyx_kwds);
5549  switch (pos_args) {
5550  case 0:
5551  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
5552  else goto __pyx_L5_argtuple_error;
5553  CYTHON_FALLTHROUGH;
5554  case 1:
5555  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
5556  else {
5557  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 1); __PYX_ERR(1, 418, __pyx_L3_error)
5558  }
5559  CYTHON_FALLTHROUGH;
5560  case 2:
5561  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
5562  else {
5563  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 2); __PYX_ERR(1, 418, __pyx_L3_error)
5564  }
5565  CYTHON_FALLTHROUGH;
5566  case 3:
5567  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
5568  else {
5569  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, 3); __PYX_ERR(1, 418, __pyx_L3_error)
5570  }
5571  }
5572  if (unlikely(kw_args > 0)) {
5573  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(1, 418, __pyx_L3_error)
5574  }
5575  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
5576  goto __pyx_L5_argtuple_error;
5577  } else {
5578  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5579  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5580  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5581  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
5582  }
5583  __pyx_v_self = values[0];
5584  __pyx_v_mesh = values[1];
5585  __pyx_v_t = values[2];
5586  __pyx_v_cq = values[3];
5587  }
5588  goto __pyx_L4_argument_unpacking_done;
5589  __pyx_L5_argtuple_error:;
5590  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 418, __pyx_L3_error)
5591  __pyx_L3_error:;
5592  __Pyx_AddTraceback("ADR.ShockCapturing.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
5593  __Pyx_RefNannyFinishContext();
5594  return NULL;
5595  __pyx_L4_argument_unpacking_done:;
5596  __pyx_r = __pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_mesh, __pyx_v_t, __pyx_v_cq);
5597 
5598  /* function exit code */
5599  __Pyx_RefNannyFinishContext();
5600  return __pyx_r;
5601 }
5602 
5603 static PyObject *__pyx_pf_3ADR_14ShockCapturing_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mesh, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq) {
5604  PyObject *__pyx_v_ci = NULL;
5605  PyObject *__pyx_r = NULL;
5606  __Pyx_RefNannyDeclarations
5607  PyObject *__pyx_t_1 = NULL;
5608  PyObject *__pyx_t_2 = NULL;
5609  Py_ssize_t __pyx_t_3;
5610  PyObject *(*__pyx_t_4)(PyObject *);
5611  PyObject *__pyx_t_5 = NULL;
5612  PyObject *__pyx_t_6 = NULL;
5613  int __pyx_t_7;
5614  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
5615 
5616  /* "ADR.pyx":419
5617  * self.lag=False
5618  * def initializeElementQuadrature(self,mesh,t,cq):
5619  * self.mesh=mesh # <<<<<<<<<<<<<<
5620  * self.numDiff=[]
5621  * self.numDiff_last=[]
5622  */
5623  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mesh, __pyx_v_mesh) < 0) __PYX_ERR(1, 419, __pyx_L1_error)
5624 
5625  /* "ADR.pyx":420
5626  * def initializeElementQuadrature(self,mesh,t,cq):
5627  * self.mesh=mesh
5628  * self.numDiff=[] # <<<<<<<<<<<<<<
5629  * self.numDiff_last=[]
5630  * for ci in range(self.nc):
5631  */
5632  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 420, __pyx_L1_error)
5633  __Pyx_GOTREF(__pyx_t_1);
5634  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff, __pyx_t_1) < 0) __PYX_ERR(1, 420, __pyx_L1_error)
5635  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5636 
5637  /* "ADR.pyx":421
5638  * self.mesh=mesh
5639  * self.numDiff=[]
5640  * self.numDiff_last=[] # <<<<<<<<<<<<<<
5641  * for ci in range(self.nc):
5642  * self.numDiff.append(cq[('numDiff',ci,ci)])
5643  */
5644  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 421, __pyx_L1_error)
5645  __Pyx_GOTREF(__pyx_t_1);
5646  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last, __pyx_t_1) < 0) __PYX_ERR(1, 421, __pyx_L1_error)
5647  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5648 
5649  /* "ADR.pyx":422
5650  * self.numDiff=[]
5651  * self.numDiff_last=[]
5652  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5653  * self.numDiff.append(cq[('numDiff',ci,ci)])
5654  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5655  */
5656  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 422, __pyx_L1_error)
5657  __Pyx_GOTREF(__pyx_t_1);
5658  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 422, __pyx_L1_error)
5659  __Pyx_GOTREF(__pyx_t_2);
5660  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5661  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
5662  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
5663  __pyx_t_4 = NULL;
5664  } else {
5665  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 422, __pyx_L1_error)
5666  __Pyx_GOTREF(__pyx_t_1);
5667  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 422, __pyx_L1_error)
5668  }
5669  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5670  for (;;) {
5671  if (likely(!__pyx_t_4)) {
5672  if (likely(PyList_CheckExact(__pyx_t_1))) {
5673  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
5674  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5675  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 422, __pyx_L1_error)
5676  #else
5677  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 422, __pyx_L1_error)
5678  __Pyx_GOTREF(__pyx_t_2);
5679  #endif
5680  } else {
5681  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5682  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5683  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 422, __pyx_L1_error)
5684  #else
5685  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 422, __pyx_L1_error)
5686  __Pyx_GOTREF(__pyx_t_2);
5687  #endif
5688  }
5689  } else {
5690  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
5691  if (unlikely(!__pyx_t_2)) {
5692  PyObject* exc_type = PyErr_Occurred();
5693  if (exc_type) {
5694  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5695  else __PYX_ERR(1, 422, __pyx_L1_error)
5696  }
5697  break;
5698  }
5699  __Pyx_GOTREF(__pyx_t_2);
5700  }
5701  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
5702  __pyx_t_2 = 0;
5703 
5704  /* "ADR.pyx":423
5705  * self.numDiff_last=[]
5706  * for ci in range(self.nc):
5707  * self.numDiff.append(cq[('numDiff',ci,ci)]) # <<<<<<<<<<<<<<
5708  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5709  * def updateShockCapturingHistory(self):
5710  */
5711  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 423, __pyx_L1_error)
5712  __Pyx_GOTREF(__pyx_t_2);
5713  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 423, __pyx_L1_error)
5714  __Pyx_GOTREF(__pyx_t_5);
5715  __Pyx_INCREF(__pyx_n_s_numDiff);
5716  __Pyx_GIVEREF(__pyx_n_s_numDiff);
5717  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_numDiff);
5718  __Pyx_INCREF(__pyx_v_ci);
5719  __Pyx_GIVEREF(__pyx_v_ci);
5720  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
5721  __Pyx_INCREF(__pyx_v_ci);
5722  __Pyx_GIVEREF(__pyx_v_ci);
5723  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ci);
5724  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 423, __pyx_L1_error)
5725  __Pyx_GOTREF(__pyx_t_6);
5726  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5727  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_6); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 423, __pyx_L1_error)
5728  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5729  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5730 
5731  /* "ADR.pyx":424
5732  * for ci in range(self.nc):
5733  * self.numDiff.append(cq[('numDiff',ci,ci)])
5734  * self.numDiff_last.append(cq[('numDiff',ci,ci)]) # <<<<<<<<<<<<<<
5735  * def updateShockCapturingHistory(self):
5736  * self.nSteps += 1
5737  */
5738  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 424, __pyx_L1_error)
5739  __Pyx_GOTREF(__pyx_t_6);
5740  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error)
5741  __Pyx_GOTREF(__pyx_t_2);
5742  __Pyx_INCREF(__pyx_n_s_numDiff);
5743  __Pyx_GIVEREF(__pyx_n_s_numDiff);
5744  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_numDiff);
5745  __Pyx_INCREF(__pyx_v_ci);
5746  __Pyx_GIVEREF(__pyx_v_ci);
5747  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
5748  __Pyx_INCREF(__pyx_v_ci);
5749  __Pyx_GIVEREF(__pyx_v_ci);
5750  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ci);
5751  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_cq, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 424, __pyx_L1_error)
5752  __Pyx_GOTREF(__pyx_t_5);
5753  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5754  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(1, 424, __pyx_L1_error)
5755  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5756  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5757 
5758  /* "ADR.pyx":422
5759  * self.numDiff=[]
5760  * self.numDiff_last=[]
5761  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5762  * self.numDiff.append(cq[('numDiff',ci,ci)])
5763  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5764  */
5765  }
5766  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5767 
5768  /* "ADR.pyx":418
5769  * self.nStepsToDelay=1
5770  * self.lag=False
5771  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
5772  * self.mesh=mesh
5773  * self.numDiff=[]
5774  */
5775 
5776  /* function exit code */
5777  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5778  goto __pyx_L0;
5779  __pyx_L1_error:;
5780  __Pyx_XDECREF(__pyx_t_1);
5781  __Pyx_XDECREF(__pyx_t_2);
5782  __Pyx_XDECREF(__pyx_t_5);
5783  __Pyx_XDECREF(__pyx_t_6);
5784  __Pyx_AddTraceback("ADR.ShockCapturing.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
5785  __pyx_r = NULL;
5786  __pyx_L0:;
5787  __Pyx_XDECREF(__pyx_v_ci);
5788  __Pyx_XGIVEREF(__pyx_r);
5789  __Pyx_RefNannyFinishContext();
5790  return __pyx_r;
5791 }
5792 
5793 /* "ADR.pyx":425
5794  * self.numDiff.append(cq[('numDiff',ci,ci)])
5795  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5796  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
5797  * self.nSteps += 1
5798  * if self.lag:
5799  */
5800 
5801 /* Python wrapper */
5802 static PyObject *__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
5803 static PyMethodDef __pyx_mdef_3ADR_14ShockCapturing_5updateShockCapturingHistory = {"updateShockCapturingHistory", (PyCFunction)__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory, METH_O, 0};
5804 static PyObject *__pyx_pw_3ADR_14ShockCapturing_5updateShockCapturingHistory(PyObject *__pyx_self, PyObject *__pyx_v_self) {
5805  PyObject *__pyx_r = 0;
5806  __Pyx_RefNannyDeclarations
5807  __Pyx_RefNannySetupContext("updateShockCapturingHistory (wrapper)", 0);
5808  __pyx_r = __pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(__pyx_self, ((PyObject *)__pyx_v_self));
5809 
5810  /* function exit code */
5811  __Pyx_RefNannyFinishContext();
5812  return __pyx_r;
5813 }
5814 
5815 static PyObject *__pyx_pf_3ADR_14ShockCapturing_4updateShockCapturingHistory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
5816  PyObject *__pyx_v_ci = NULL;
5817  PyObject *__pyx_r = NULL;
5818  __Pyx_RefNannyDeclarations
5819  PyObject *__pyx_t_1 = NULL;
5820  PyObject *__pyx_t_2 = NULL;
5821  int __pyx_t_3;
5822  Py_ssize_t __pyx_t_4;
5823  PyObject *(*__pyx_t_5)(PyObject *);
5824  PyObject *__pyx_t_6 = NULL;
5825  PyObject *__pyx_t_7 = NULL;
5826  int __pyx_t_8;
5827  int __pyx_t_9;
5828  PyObject *__pyx_t_10 = NULL;
5829  int __pyx_t_11;
5830  PyObject *__pyx_t_12 = NULL;
5831  PyObject *__pyx_t_13 = NULL;
5832  __Pyx_RefNannySetupContext("updateShockCapturingHistory", 0);
5833 
5834  /* "ADR.pyx":426
5835  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
5836  * def updateShockCapturingHistory(self):
5837  * self.nSteps += 1 # <<<<<<<<<<<<<<
5838  * if self.lag:
5839  * for ci in range(self.nc):
5840  */
5841  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSteps); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 426, __pyx_L1_error)
5842  __Pyx_GOTREF(__pyx_t_1);
5843  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 426, __pyx_L1_error)
5844  __Pyx_GOTREF(__pyx_t_2);
5845  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5846  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSteps, __pyx_t_2) < 0) __PYX_ERR(1, 426, __pyx_L1_error)
5847  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5848 
5849  /* "ADR.pyx":427
5850  * def updateShockCapturingHistory(self):
5851  * self.nSteps += 1
5852  * if self.lag: # <<<<<<<<<<<<<<
5853  * for ci in range(self.nc):
5854  * self.numDiff_last[ci][:] = self.numDiff[ci]
5855  */
5856  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error)
5857  __Pyx_GOTREF(__pyx_t_2);
5858  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 427, __pyx_L1_error)
5859  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5860  if (__pyx_t_3) {
5861 
5862  /* "ADR.pyx":428
5863  * self.nSteps += 1
5864  * if self.lag:
5865  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5866  * self.numDiff_last[ci][:] = self.numDiff[ci]
5867  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5868  */
5869  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 428, __pyx_L1_error)
5870  __Pyx_GOTREF(__pyx_t_2);
5871  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error)
5872  __Pyx_GOTREF(__pyx_t_1);
5873  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5874  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
5875  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
5876  __pyx_t_5 = NULL;
5877  } else {
5878  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 428, __pyx_L1_error)
5879  __Pyx_GOTREF(__pyx_t_2);
5880  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 428, __pyx_L1_error)
5881  }
5882  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5883  for (;;) {
5884  if (likely(!__pyx_t_5)) {
5885  if (likely(PyList_CheckExact(__pyx_t_2))) {
5886  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
5887  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5888  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 428, __pyx_L1_error)
5889  #else
5890  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error)
5891  __Pyx_GOTREF(__pyx_t_1);
5892  #endif
5893  } else {
5894  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5895  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5896  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 428, __pyx_L1_error)
5897  #else
5898  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error)
5899  __Pyx_GOTREF(__pyx_t_1);
5900  #endif
5901  }
5902  } else {
5903  __pyx_t_1 = __pyx_t_5(__pyx_t_2);
5904  if (unlikely(!__pyx_t_1)) {
5905  PyObject* exc_type = PyErr_Occurred();
5906  if (exc_type) {
5907  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5908  else __PYX_ERR(1, 428, __pyx_L1_error)
5909  }
5910  break;
5911  }
5912  __Pyx_GOTREF(__pyx_t_1);
5913  }
5914  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_1);
5915  __pyx_t_1 = 0;
5916 
5917  /* "ADR.pyx":429
5918  * if self.lag:
5919  * for ci in range(self.nc):
5920  * self.numDiff_last[ci][:] = self.numDiff[ci] # <<<<<<<<<<<<<<
5921  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5922  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5923  */
5924  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
5925  __Pyx_GOTREF(__pyx_t_1);
5926  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 429, __pyx_L1_error)
5927  __Pyx_GOTREF(__pyx_t_6);
5928  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5929  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
5930  __Pyx_GOTREF(__pyx_t_1);
5931  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 429, __pyx_L1_error)
5932  __Pyx_GOTREF(__pyx_t_7);
5933  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5934  if (__Pyx_PyObject_SetSlice(__pyx_t_7, __pyx_t_6, 0, 0, NULL, NULL, &__pyx_slice__3, 0, 0, 1) < 0) __PYX_ERR(1, 429, __pyx_L1_error)
5935  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5936  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5937 
5938  /* "ADR.pyx":428
5939  * self.nSteps += 1
5940  * if self.lag:
5941  * for ci in range(self.nc): # <<<<<<<<<<<<<<
5942  * self.numDiff_last[ci][:] = self.numDiff[ci]
5943  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
5944  */
5945  }
5946  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5947 
5948  /* "ADR.pyx":427
5949  * def updateShockCapturingHistory(self):
5950  * self.nSteps += 1
5951  * if self.lag: # <<<<<<<<<<<<<<
5952  * for ci in range(self.nc):
5953  * self.numDiff_last[ci][:] = self.numDiff[ci]
5954  */
5955  }
5956 
5957  /* "ADR.pyx":430
5958  * for ci in range(self.nc):
5959  * self.numDiff_last[ci][:] = self.numDiff[ci]
5960  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay: # <<<<<<<<<<<<<<
5961  * log("ADR.ShockCapturing: switched to lagged shock capturing")
5962  * self.lag = True
5963  */
5964  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lag); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 430, __pyx_L1_error)
5965  __Pyx_GOTREF(__pyx_t_2);
5966  __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 430, __pyx_L1_error)
5967  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5968  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 430, __pyx_L1_error)
5969  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5970  if (__pyx_t_8) {
5971  } else {
5972  __pyx_t_3 = __pyx_t_8;
5973  goto __pyx_L7_bool_binop_done;
5974  }
5975  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 430, __pyx_L1_error)
5976  __Pyx_GOTREF(__pyx_t_6);
5977  __pyx_t_8 = (__pyx_t_6 != Py_None);
5978  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5979  __pyx_t_9 = (__pyx_t_8 != 0);
5980  if (__pyx_t_9) {
5981  } else {
5982  __pyx_t_3 = __pyx_t_9;
5983  goto __pyx_L7_bool_binop_done;
5984  }
5985  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSteps); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 430, __pyx_L1_error)
5986  __Pyx_GOTREF(__pyx_t_6);
5987  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 430, __pyx_L1_error)
5988  __Pyx_GOTREF(__pyx_t_2);
5989  __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 430, __pyx_L1_error)
5990  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5991  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5992  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 430, __pyx_L1_error)
5993  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5994  __pyx_t_3 = __pyx_t_9;
5995  __pyx_L7_bool_binop_done:;
5996  if (__pyx_t_3) {
5997 
5998  /* "ADR.pyx":431
5999  * self.numDiff_last[ci][:] = self.numDiff[ci]
6000  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
6001  * log("ADR.ShockCapturing: switched to lagged shock capturing") # <<<<<<<<<<<<<<
6002  * self.lag = True
6003  * self.numDiff_last=[]
6004  */
6005  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 431, __pyx_L1_error)
6006  __Pyx_GOTREF(__pyx_t_2);
6007  __pyx_t_6 = NULL;
6008  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
6009  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
6010  if (likely(__pyx_t_6)) {
6011  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6012  __Pyx_INCREF(__pyx_t_6);
6013  __Pyx_INCREF(function);
6014  __Pyx_DECREF_SET(__pyx_t_2, function);
6015  }
6016  }
6017  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_kp_s_ADR_ShockCapturing_switched_to_l) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_ADR_ShockCapturing_switched_to_l);
6018  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6019  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 431, __pyx_L1_error)
6020  __Pyx_GOTREF(__pyx_t_7);
6021  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6022  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6023 
6024  /* "ADR.pyx":432
6025  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
6026  * log("ADR.ShockCapturing: switched to lagged shock capturing")
6027  * self.lag = True # <<<<<<<<<<<<<<
6028  * self.numDiff_last=[]
6029  * for ci in range(self.nc):
6030  */
6031  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lag, Py_True) < 0) __PYX_ERR(1, 432, __pyx_L1_error)
6032 
6033  /* "ADR.pyx":433
6034  * log("ADR.ShockCapturing: switched to lagged shock capturing")
6035  * self.lag = True
6036  * self.numDiff_last=[] # <<<<<<<<<<<<<<
6037  * for ci in range(self.nc):
6038  * self.numDiff_last.append(self.numDiff[ci].copy())
6039  */
6040  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 433, __pyx_L1_error)
6041  __Pyx_GOTREF(__pyx_t_7);
6042  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last, __pyx_t_7) < 0) __PYX_ERR(1, 433, __pyx_L1_error)
6043  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6044 
6045  /* "ADR.pyx":434
6046  * self.lag = True
6047  * self.numDiff_last=[]
6048  * for ci in range(self.nc): # <<<<<<<<<<<<<<
6049  * self.numDiff_last.append(self.numDiff[ci].copy())
6050  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
6051  */
6052  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 434, __pyx_L1_error)
6053  __Pyx_GOTREF(__pyx_t_7);
6054  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 434, __pyx_L1_error)
6055  __Pyx_GOTREF(__pyx_t_2);
6056  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6057  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
6058  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
6059  __pyx_t_5 = NULL;
6060  } else {
6061  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 434, __pyx_L1_error)
6062  __Pyx_GOTREF(__pyx_t_7);
6063  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 434, __pyx_L1_error)
6064  }
6065  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6066  for (;;) {
6067  if (likely(!__pyx_t_5)) {
6068  if (likely(PyList_CheckExact(__pyx_t_7))) {
6069  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
6070  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6071  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 434, __pyx_L1_error)
6072  #else
6073  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 434, __pyx_L1_error)
6074  __Pyx_GOTREF(__pyx_t_2);
6075  #endif
6076  } else {
6077  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
6078  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6079  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 434, __pyx_L1_error)
6080  #else
6081  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 434, __pyx_L1_error)
6082  __Pyx_GOTREF(__pyx_t_2);
6083  #endif
6084  }
6085  } else {
6086  __pyx_t_2 = __pyx_t_5(__pyx_t_7);
6087  if (unlikely(!__pyx_t_2)) {
6088  PyObject* exc_type = PyErr_Occurred();
6089  if (exc_type) {
6090  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6091  else __PYX_ERR(1, 434, __pyx_L1_error)
6092  }
6093  break;
6094  }
6095  __Pyx_GOTREF(__pyx_t_2);
6096  }
6097  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
6098  __pyx_t_2 = 0;
6099 
6100  /* "ADR.pyx":435
6101  * self.numDiff_last=[]
6102  * for ci in range(self.nc):
6103  * self.numDiff_last.append(self.numDiff[ci].copy()) # <<<<<<<<<<<<<<
6104  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
6105  *
6106  */
6107  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 435, __pyx_L1_error)
6108  __Pyx_GOTREF(__pyx_t_2);
6109  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 435, __pyx_L1_error)
6110  __Pyx_GOTREF(__pyx_t_1);
6111  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 435, __pyx_L1_error)
6112  __Pyx_GOTREF(__pyx_t_10);
6113  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6114  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 435, __pyx_L1_error)
6115  __Pyx_GOTREF(__pyx_t_1);
6116  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6117  __pyx_t_10 = NULL;
6118  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
6119  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
6120  if (likely(__pyx_t_10)) {
6121  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
6122  __Pyx_INCREF(__pyx_t_10);
6123  __Pyx_INCREF(function);
6124  __Pyx_DECREF_SET(__pyx_t_1, function);
6125  }
6126  }
6127  __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
6128  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6129  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 435, __pyx_L1_error)
6130  __Pyx_GOTREF(__pyx_t_6);
6131  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6132  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 435, __pyx_L1_error)
6133  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6134  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6135 
6136  /* "ADR.pyx":434
6137  * self.lag = True
6138  * self.numDiff_last=[]
6139  * for ci in range(self.nc): # <<<<<<<<<<<<<<
6140  * self.numDiff_last.append(self.numDiff[ci].copy())
6141  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
6142  */
6143  }
6144  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6145 
6146  /* "ADR.pyx":430
6147  * for ci in range(self.nc):
6148  * self.numDiff_last[ci][:] = self.numDiff[ci]
6149  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay: # <<<<<<<<<<<<<<
6150  * log("ADR.ShockCapturing: switched to lagged shock capturing")
6151  * self.lag = True
6152  */
6153  }
6154 
6155  /* "ADR.pyx":436
6156  * for ci in range(self.nc):
6157  * self.numDiff_last.append(self.numDiff[ci].copy())
6158  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),)) # <<<<<<<<<<<<<<
6159  *
6160  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
6161  */
6162  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 436, __pyx_L1_error)
6163  __Pyx_GOTREF(__pyx_t_6);
6164  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_globalMax); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 436, __pyx_L1_error)
6165  __Pyx_GOTREF(__pyx_t_1);
6166  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 436, __pyx_L1_error)
6167  __Pyx_GOTREF(__pyx_t_12);
6168  __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_12, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 436, __pyx_L1_error)
6169  __Pyx_GOTREF(__pyx_t_13);
6170  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6171  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_max); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 436, __pyx_L1_error)
6172  __Pyx_GOTREF(__pyx_t_12);
6173  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6174  __pyx_t_13 = NULL;
6175  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
6176  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
6177  if (likely(__pyx_t_13)) {
6178  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
6179  __Pyx_INCREF(__pyx_t_13);
6180  __Pyx_INCREF(function);
6181  __Pyx_DECREF_SET(__pyx_t_12, function);
6182  }
6183  }
6184  __pyx_t_10 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_12);
6185  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6186  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 436, __pyx_L1_error)
6187  __Pyx_GOTREF(__pyx_t_10);
6188  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6189  __pyx_t_12 = NULL;
6190  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
6191  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
6192  if (likely(__pyx_t_12)) {
6193  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
6194  __Pyx_INCREF(__pyx_t_12);
6195  __Pyx_INCREF(function);
6196  __Pyx_DECREF_SET(__pyx_t_1, function);
6197  }
6198  }
6199  __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10);
6200  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6201  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6202  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 436, __pyx_L1_error)
6203  __Pyx_GOTREF(__pyx_t_2);
6204  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6205  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 436, __pyx_L1_error)
6206  __Pyx_GOTREF(__pyx_t_1);
6207  __Pyx_GIVEREF(__pyx_t_2);
6208  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
6209  __pyx_t_2 = 0;
6210  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_VOF_max_numDiff_e, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 436, __pyx_L1_error)
6211  __Pyx_GOTREF(__pyx_t_2);
6212  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6213  __pyx_t_1 = NULL;
6214  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
6215  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
6216  if (likely(__pyx_t_1)) {
6217  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
6218  __Pyx_INCREF(__pyx_t_1);
6219  __Pyx_INCREF(function);
6220  __Pyx_DECREF_SET(__pyx_t_6, function);
6221  }
6222  }
6223  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
6224  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6225  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6226  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 436, __pyx_L1_error)
6227  __Pyx_GOTREF(__pyx_t_7);
6228  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6229  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6230 
6231  /* "ADR.pyx":425
6232  * self.numDiff.append(cq[('numDiff',ci,ci)])
6233  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
6234  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
6235  * self.nSteps += 1
6236  * if self.lag:
6237  */
6238 
6239  /* function exit code */
6240  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6241  goto __pyx_L0;
6242  __pyx_L1_error:;
6243  __Pyx_XDECREF(__pyx_t_1);
6244  __Pyx_XDECREF(__pyx_t_2);
6245  __Pyx_XDECREF(__pyx_t_6);
6246  __Pyx_XDECREF(__pyx_t_7);
6247  __Pyx_XDECREF(__pyx_t_10);
6248  __Pyx_XDECREF(__pyx_t_12);
6249  __Pyx_XDECREF(__pyx_t_13);
6250  __Pyx_AddTraceback("ADR.ShockCapturing.updateShockCapturingHistory", __pyx_clineno, __pyx_lineno, __pyx_filename);
6251  __pyx_r = NULL;
6252  __pyx_L0:;
6253  __Pyx_XDECREF(__pyx_v_ci);
6254  __Pyx_XGIVEREF(__pyx_r);
6255  __Pyx_RefNannyFinishContext();
6256  return __pyx_r;
6257 }
6258 
6259 /* "ADR.pyx":439
6260  *
6261  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
6262  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6263  * getAdvectiveFluxBoundaryConditions,
6264  * getDiffusiveFluxBoundaryConditions):
6265  */
6266 
6267 /* Python wrapper */
6268 static PyObject *__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6269 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_IIPG_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6270 static PyObject *__pyx_pw_3ADR_18NumericalFlux_IIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6271  PyObject *__pyx_v_self = 0;
6272  PyObject *__pyx_v_vt = 0;
6273  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
6274  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
6275  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
6276  PyObject *__pyx_r = 0;
6277  __Pyx_RefNannyDeclarations
6278  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6279  {
6280  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
6281  PyObject* values[5] = {0,0,0,0,0};
6282  if (unlikely(__pyx_kwds)) {
6283  Py_ssize_t kw_args;
6284  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6285  switch (pos_args) {
6286  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6287  CYTHON_FALLTHROUGH;
6288  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6289  CYTHON_FALLTHROUGH;
6290  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6291  CYTHON_FALLTHROUGH;
6292  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6293  CYTHON_FALLTHROUGH;
6294  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6295  CYTHON_FALLTHROUGH;
6296  case 0: break;
6297  default: goto __pyx_L5_argtuple_error;
6298  }
6299  kw_args = PyDict_Size(__pyx_kwds);
6300  switch (pos_args) {
6301  case 0:
6302  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6303  else goto __pyx_L5_argtuple_error;
6304  CYTHON_FALLTHROUGH;
6305  case 1:
6306  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
6307  else {
6308  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(1, 439, __pyx_L3_error)
6309  }
6310  CYTHON_FALLTHROUGH;
6311  case 2:
6312  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
6313  else {
6314  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(1, 439, __pyx_L3_error)
6315  }
6316  CYTHON_FALLTHROUGH;
6317  case 3:
6318  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
6319  else {
6320  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(1, 439, __pyx_L3_error)
6321  }
6322  CYTHON_FALLTHROUGH;
6323  case 4:
6324  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
6325  else {
6326  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(1, 439, __pyx_L3_error)
6327  }
6328  }
6329  if (unlikely(kw_args > 0)) {
6330  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 439, __pyx_L3_error)
6331  }
6332  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6333  goto __pyx_L5_argtuple_error;
6334  } else {
6335  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6336  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6337  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6338  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6339  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6340  }
6341  __pyx_v_self = values[0];
6342  __pyx_v_vt = values[1];
6343  __pyx_v_getPointwiseBoundaryConditions = values[2];
6344  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
6345  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
6346  }
6347  goto __pyx_L4_argument_unpacking_done;
6348  __pyx_L5_argtuple_error:;
6349  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 439, __pyx_L3_error)
6350  __pyx_L3_error:;
6351  __Pyx_AddTraceback("ADR.NumericalFlux_IIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6352  __Pyx_RefNannyFinishContext();
6353  return NULL;
6354  __pyx_L4_argument_unpacking_done:;
6355  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_IIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
6356 
6357  /* function exit code */
6358  __Pyx_RefNannyFinishContext();
6359  return __pyx_r;
6360 }
6361 
6362 static PyObject *__pyx_pf_3ADR_18NumericalFlux_IIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
6363  PyObject *__pyx_r = NULL;
6364  __Pyx_RefNannyDeclarations
6365  PyObject *__pyx_t_1 = NULL;
6366  PyObject *__pyx_t_2 = NULL;
6367  PyObject *__pyx_t_3 = NULL;
6368  int __pyx_t_4;
6369  PyObject *__pyx_t_5 = NULL;
6370  __Pyx_RefNannySetupContext("__init__", 0);
6371 
6372  /* "ADR.pyx":442
6373  * getAdvectiveFluxBoundaryConditions,
6374  * getDiffusiveFluxBoundaryConditions):
6375  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6376  * getAdvectiveFluxBoundaryConditions,
6377  * getDiffusiveFluxBoundaryConditions)
6378  */
6379  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 442, __pyx_L1_error)
6380  __Pyx_GOTREF(__pyx_t_2);
6381  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 442, __pyx_L1_error)
6382  __Pyx_GOTREF(__pyx_t_3);
6383  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6384  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 442, __pyx_L1_error)
6385  __Pyx_GOTREF(__pyx_t_2);
6386  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6387  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 442, __pyx_L1_error)
6388  __Pyx_GOTREF(__pyx_t_3);
6389  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6390 
6391  /* "ADR.pyx":444
6392  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
6393  * getAdvectiveFluxBoundaryConditions,
6394  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
6395  *
6396  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
6397  */
6398  __pyx_t_2 = NULL;
6399  __pyx_t_4 = 0;
6400  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6401  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6402  if (likely(__pyx_t_2)) {
6403  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6404  __Pyx_INCREF(__pyx_t_2);
6405  __Pyx_INCREF(function);
6406  __Pyx_DECREF_SET(__pyx_t_3, function);
6407  __pyx_t_4 = 1;
6408  }
6409  }
6410  #if CYTHON_FAST_PYCALL
6411  if (PyFunction_Check(__pyx_t_3)) {
6412  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6413  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 442, __pyx_L1_error)
6414  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6415  __Pyx_GOTREF(__pyx_t_1);
6416  } else
6417  #endif
6418  #if CYTHON_FAST_PYCCALL
6419  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6420  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6421  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 442, __pyx_L1_error)
6422  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6423  __Pyx_GOTREF(__pyx_t_1);
6424  } else
6425  #endif
6426  {
6427  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 442, __pyx_L1_error)
6428  __Pyx_GOTREF(__pyx_t_5);
6429  if (__pyx_t_2) {
6430  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
6431  }
6432  __Pyx_INCREF(__pyx_v_self);
6433  __Pyx_GIVEREF(__pyx_v_self);
6434  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
6435  __Pyx_INCREF(__pyx_v_vt);
6436  __Pyx_GIVEREF(__pyx_v_vt);
6437  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
6438  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
6439  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
6440  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
6441  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6442  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6443  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
6444  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6445  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6446  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
6447  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 442, __pyx_L1_error)
6448  __Pyx_GOTREF(__pyx_t_1);
6449  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6450  }
6451  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6452  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6453 
6454  /* "ADR.pyx":439
6455  *
6456  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
6457  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6458  * getAdvectiveFluxBoundaryConditions,
6459  * getDiffusiveFluxBoundaryConditions):
6460  */
6461 
6462  /* function exit code */
6463  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6464  goto __pyx_L0;
6465  __pyx_L1_error:;
6466  __Pyx_XDECREF(__pyx_t_1);
6467  __Pyx_XDECREF(__pyx_t_2);
6468  __Pyx_XDECREF(__pyx_t_3);
6469  __Pyx_XDECREF(__pyx_t_5);
6470  __Pyx_AddTraceback("ADR.NumericalFlux_IIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6471  __pyx_r = NULL;
6472  __pyx_L0:;
6473  __Pyx_XGIVEREF(__pyx_r);
6474  __Pyx_RefNannyFinishContext();
6475  return __pyx_r;
6476 }
6477 
6478 /* "ADR.pyx":447
6479  *
6480  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
6481  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6482  * getAdvectiveFluxBoundaryConditions,
6483  * getDiffusiveFluxBoundaryConditions):
6484  */
6485 
6486 /* Python wrapper */
6487 static PyObject *__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6488 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_SIPG_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6489 static PyObject *__pyx_pw_3ADR_18NumericalFlux_SIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6490  PyObject *__pyx_v_self = 0;
6491  PyObject *__pyx_v_vt = 0;
6492  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
6493  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
6494  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
6495  PyObject *__pyx_r = 0;
6496  __Pyx_RefNannyDeclarations
6497  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6498  {
6499  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
6500  PyObject* values[5] = {0,0,0,0,0};
6501  if (unlikely(__pyx_kwds)) {
6502  Py_ssize_t kw_args;
6503  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6504  switch (pos_args) {
6505  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6506  CYTHON_FALLTHROUGH;
6507  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6508  CYTHON_FALLTHROUGH;
6509  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6510  CYTHON_FALLTHROUGH;
6511  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6512  CYTHON_FALLTHROUGH;
6513  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6514  CYTHON_FALLTHROUGH;
6515  case 0: break;
6516  default: goto __pyx_L5_argtuple_error;
6517  }
6518  kw_args = PyDict_Size(__pyx_kwds);
6519  switch (pos_args) {
6520  case 0:
6521  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6522  else goto __pyx_L5_argtuple_error;
6523  CYTHON_FALLTHROUGH;
6524  case 1:
6525  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
6526  else {
6527  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(1, 447, __pyx_L3_error)
6528  }
6529  CYTHON_FALLTHROUGH;
6530  case 2:
6531  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
6532  else {
6533  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(1, 447, __pyx_L3_error)
6534  }
6535  CYTHON_FALLTHROUGH;
6536  case 3:
6537  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
6538  else {
6539  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(1, 447, __pyx_L3_error)
6540  }
6541  CYTHON_FALLTHROUGH;
6542  case 4:
6543  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
6544  else {
6545  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(1, 447, __pyx_L3_error)
6546  }
6547  }
6548  if (unlikely(kw_args > 0)) {
6549  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 447, __pyx_L3_error)
6550  }
6551  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6552  goto __pyx_L5_argtuple_error;
6553  } else {
6554  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6555  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6556  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6557  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6558  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6559  }
6560  __pyx_v_self = values[0];
6561  __pyx_v_vt = values[1];
6562  __pyx_v_getPointwiseBoundaryConditions = values[2];
6563  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
6564  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
6565  }
6566  goto __pyx_L4_argument_unpacking_done;
6567  __pyx_L5_argtuple_error:;
6568  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 447, __pyx_L3_error)
6569  __pyx_L3_error:;
6570  __Pyx_AddTraceback("ADR.NumericalFlux_SIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6571  __Pyx_RefNannyFinishContext();
6572  return NULL;
6573  __pyx_L4_argument_unpacking_done:;
6574  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_SIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
6575 
6576  /* function exit code */
6577  __Pyx_RefNannyFinishContext();
6578  return __pyx_r;
6579 }
6580 
6581 static PyObject *__pyx_pf_3ADR_18NumericalFlux_SIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
6582  PyObject *__pyx_r = NULL;
6583  __Pyx_RefNannyDeclarations
6584  PyObject *__pyx_t_1 = NULL;
6585  PyObject *__pyx_t_2 = NULL;
6586  PyObject *__pyx_t_3 = NULL;
6587  int __pyx_t_4;
6588  PyObject *__pyx_t_5 = NULL;
6589  __Pyx_RefNannySetupContext("__init__", 0);
6590 
6591  /* "ADR.pyx":450
6592  * getAdvectiveFluxBoundaryConditions,
6593  * getDiffusiveFluxBoundaryConditions):
6594  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6595  * getAdvectiveFluxBoundaryConditions,
6596  * getDiffusiveFluxBoundaryConditions)
6597  */
6598  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 450, __pyx_L1_error)
6599  __Pyx_GOTREF(__pyx_t_2);
6600  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 450, __pyx_L1_error)
6601  __Pyx_GOTREF(__pyx_t_3);
6602  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6603  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 450, __pyx_L1_error)
6604  __Pyx_GOTREF(__pyx_t_2);
6605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6606  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 450, __pyx_L1_error)
6607  __Pyx_GOTREF(__pyx_t_3);
6608  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6609 
6610  /* "ADR.pyx":452
6611  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
6612  * getAdvectiveFluxBoundaryConditions,
6613  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
6614  *
6615  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6616  */
6617  __pyx_t_2 = NULL;
6618  __pyx_t_4 = 0;
6619  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6620  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6621  if (likely(__pyx_t_2)) {
6622  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6623  __Pyx_INCREF(__pyx_t_2);
6624  __Pyx_INCREF(function);
6625  __Pyx_DECREF_SET(__pyx_t_3, function);
6626  __pyx_t_4 = 1;
6627  }
6628  }
6629  #if CYTHON_FAST_PYCALL
6630  if (PyFunction_Check(__pyx_t_3)) {
6631  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6632  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __pyx_L1_error)
6633  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6634  __Pyx_GOTREF(__pyx_t_1);
6635  } else
6636  #endif
6637  #if CYTHON_FAST_PYCCALL
6638  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6639  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6640  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __pyx_L1_error)
6641  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6642  __Pyx_GOTREF(__pyx_t_1);
6643  } else
6644  #endif
6645  {
6646  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 450, __pyx_L1_error)
6647  __Pyx_GOTREF(__pyx_t_5);
6648  if (__pyx_t_2) {
6649  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
6650  }
6651  __Pyx_INCREF(__pyx_v_self);
6652  __Pyx_GIVEREF(__pyx_v_self);
6653  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
6654  __Pyx_INCREF(__pyx_v_vt);
6655  __Pyx_GIVEREF(__pyx_v_vt);
6656  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
6657  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
6658  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
6659  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
6660  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6661  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6662  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
6663  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6664  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6665  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
6666  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __pyx_L1_error)
6667  __Pyx_GOTREF(__pyx_t_1);
6668  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6669  }
6670  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6671  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6672 
6673  /* "ADR.pyx":447
6674  *
6675  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
6676  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6677  * getAdvectiveFluxBoundaryConditions,
6678  * getDiffusiveFluxBoundaryConditions):
6679  */
6680 
6681  /* function exit code */
6682  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6683  goto __pyx_L0;
6684  __pyx_L1_error:;
6685  __Pyx_XDECREF(__pyx_t_1);
6686  __Pyx_XDECREF(__pyx_t_2);
6687  __Pyx_XDECREF(__pyx_t_3);
6688  __Pyx_XDECREF(__pyx_t_5);
6689  __Pyx_AddTraceback("ADR.NumericalFlux_SIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6690  __pyx_r = NULL;
6691  __pyx_L0:;
6692  __Pyx_XGIVEREF(__pyx_r);
6693  __Pyx_RefNannyFinishContext();
6694  return __pyx_r;
6695 }
6696 
6697 /* "ADR.pyx":455
6698  *
6699  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6700  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6701  * getAdvectiveFluxBoundaryConditions,
6702  * getDiffusiveFluxBoundaryConditions):
6703  */
6704 
6705 /* Python wrapper */
6706 static PyObject *__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6707 static PyMethodDef __pyx_mdef_3ADR_18NumericalFlux_NIPG_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6708 static PyObject *__pyx_pw_3ADR_18NumericalFlux_NIPG_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6709  PyObject *__pyx_v_self = 0;
6710  PyObject *__pyx_v_vt = 0;
6711  PyObject *__pyx_v_getPointwiseBoundaryConditions = 0;
6712  PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions = 0;
6713  PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions = 0;
6714  PyObject *__pyx_r = 0;
6715  __Pyx_RefNannyDeclarations
6716  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6717  {
6718  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vt,&__pyx_n_s_getPointwiseBoundaryConditions,&__pyx_n_s_getAdvectiveFluxBoundaryConditio,&__pyx_n_s_getDiffusiveFluxBoundaryConditio,0};
6719  PyObject* values[5] = {0,0,0,0,0};
6720  if (unlikely(__pyx_kwds)) {
6721  Py_ssize_t kw_args;
6722  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6723  switch (pos_args) {
6724  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6725  CYTHON_FALLTHROUGH;
6726  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6727  CYTHON_FALLTHROUGH;
6728  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6729  CYTHON_FALLTHROUGH;
6730  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6731  CYTHON_FALLTHROUGH;
6732  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6733  CYTHON_FALLTHROUGH;
6734  case 0: break;
6735  default: goto __pyx_L5_argtuple_error;
6736  }
6737  kw_args = PyDict_Size(__pyx_kwds);
6738  switch (pos_args) {
6739  case 0:
6740  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
6741  else goto __pyx_L5_argtuple_error;
6742  CYTHON_FALLTHROUGH;
6743  case 1:
6744  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vt)) != 0)) kw_args--;
6745  else {
6746  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(1, 455, __pyx_L3_error)
6747  }
6748  CYTHON_FALLTHROUGH;
6749  case 2:
6750  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getPointwiseBoundaryConditions)) != 0)) kw_args--;
6751  else {
6752  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(1, 455, __pyx_L3_error)
6753  }
6754  CYTHON_FALLTHROUGH;
6755  case 3:
6756  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getAdvectiveFluxBoundaryConditio)) != 0)) kw_args--;
6757  else {
6758  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(1, 455, __pyx_L3_error)
6759  }
6760  CYTHON_FALLTHROUGH;
6761  case 4:
6762  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_getDiffusiveFluxBoundaryConditio)) != 0)) kw_args--;
6763  else {
6764  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(1, 455, __pyx_L3_error)
6765  }
6766  }
6767  if (unlikely(kw_args > 0)) {
6768  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 455, __pyx_L3_error)
6769  }
6770  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
6771  goto __pyx_L5_argtuple_error;
6772  } else {
6773  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6774  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6775  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6776  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6777  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6778  }
6779  __pyx_v_self = values[0];
6780  __pyx_v_vt = values[1];
6781  __pyx_v_getPointwiseBoundaryConditions = values[2];
6782  __pyx_v_getAdvectiveFluxBoundaryConditions = values[3];
6783  __pyx_v_getDiffusiveFluxBoundaryConditions = values[4];
6784  }
6785  goto __pyx_L4_argument_unpacking_done;
6786  __pyx_L5_argtuple_error:;
6787  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 455, __pyx_L3_error)
6788  __pyx_L3_error:;
6789  __Pyx_AddTraceback("ADR.NumericalFlux_NIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6790  __Pyx_RefNannyFinishContext();
6791  return NULL;
6792  __pyx_L4_argument_unpacking_done:;
6793  __pyx_r = __pyx_pf_3ADR_18NumericalFlux_NIPG___init__(__pyx_self, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions);
6794 
6795  /* function exit code */
6796  __Pyx_RefNannyFinishContext();
6797  return __pyx_r;
6798 }
6799 
6800 static PyObject *__pyx_pf_3ADR_18NumericalFlux_NIPG___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vt, PyObject *__pyx_v_getPointwiseBoundaryConditions, PyObject *__pyx_v_getAdvectiveFluxBoundaryConditions, PyObject *__pyx_v_getDiffusiveFluxBoundaryConditions) {
6801  PyObject *__pyx_r = NULL;
6802  __Pyx_RefNannyDeclarations
6803  PyObject *__pyx_t_1 = NULL;
6804  PyObject *__pyx_t_2 = NULL;
6805  PyObject *__pyx_t_3 = NULL;
6806  int __pyx_t_4;
6807  PyObject *__pyx_t_5 = NULL;
6808  __Pyx_RefNannySetupContext("__init__", 0);
6809 
6810  /* "ADR.pyx":458
6811  * getAdvectiveFluxBoundaryConditions,
6812  * getDiffusiveFluxBoundaryConditions):
6813  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6814  * getAdvectiveFluxBoundaryConditions,
6815  * getDiffusiveFluxBoundaryConditions)
6816  */
6817  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 458, __pyx_L1_error)
6818  __Pyx_GOTREF(__pyx_t_2);
6819  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 458, __pyx_L1_error)
6820  __Pyx_GOTREF(__pyx_t_3);
6821  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6822  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 458, __pyx_L1_error)
6823  __Pyx_GOTREF(__pyx_t_2);
6824  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6825  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 458, __pyx_L1_error)
6826  __Pyx_GOTREF(__pyx_t_3);
6827  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6828 
6829  /* "ADR.pyx":460
6830  * proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior.__init__(self,vt,getPointwiseBoundaryConditions,
6831  * getAdvectiveFluxBoundaryConditions,
6832  * getDiffusiveFluxBoundaryConditions) # <<<<<<<<<<<<<<
6833  *
6834  * NumericalFlux = NumericalFlux_SIPG
6835  */
6836  __pyx_t_2 = NULL;
6837  __pyx_t_4 = 0;
6838  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6839  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
6840  if (likely(__pyx_t_2)) {
6841  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6842  __Pyx_INCREF(__pyx_t_2);
6843  __Pyx_INCREF(function);
6844  __Pyx_DECREF_SET(__pyx_t_3, function);
6845  __pyx_t_4 = 1;
6846  }
6847  }
6848  #if CYTHON_FAST_PYCALL
6849  if (PyFunction_Check(__pyx_t_3)) {
6850  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6851  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 458, __pyx_L1_error)
6852  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6853  __Pyx_GOTREF(__pyx_t_1);
6854  } else
6855  #endif
6856  #if CYTHON_FAST_PYCCALL
6857  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
6858  PyObject *__pyx_temp[6] = {__pyx_t_2, __pyx_v_self, __pyx_v_vt, __pyx_v_getPointwiseBoundaryConditions, __pyx_v_getAdvectiveFluxBoundaryConditions, __pyx_v_getDiffusiveFluxBoundaryConditions};
6859  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 458, __pyx_L1_error)
6860  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
6861  __Pyx_GOTREF(__pyx_t_1);
6862  } else
6863  #endif
6864  {
6865  __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 458, __pyx_L1_error)
6866  __Pyx_GOTREF(__pyx_t_5);
6867  if (__pyx_t_2) {
6868  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
6869  }
6870  __Pyx_INCREF(__pyx_v_self);
6871  __Pyx_GIVEREF(__pyx_v_self);
6872  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
6873  __Pyx_INCREF(__pyx_v_vt);
6874  __Pyx_GIVEREF(__pyx_v_vt);
6875  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_vt);
6876  __Pyx_INCREF(__pyx_v_getPointwiseBoundaryConditions);
6877  __Pyx_GIVEREF(__pyx_v_getPointwiseBoundaryConditions);
6878  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_getPointwiseBoundaryConditions);
6879  __Pyx_INCREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6880  __Pyx_GIVEREF(__pyx_v_getAdvectiveFluxBoundaryConditions);
6881  PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_getAdvectiveFluxBoundaryConditions);
6882  __Pyx_INCREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6883  __Pyx_GIVEREF(__pyx_v_getDiffusiveFluxBoundaryConditions);
6884  PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_getDiffusiveFluxBoundaryConditions);
6885  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 458, __pyx_L1_error)
6886  __Pyx_GOTREF(__pyx_t_1);
6887  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6888  }
6889  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6890  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6891 
6892  /* "ADR.pyx":455
6893  *
6894  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
6895  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
6896  * getAdvectiveFluxBoundaryConditions,
6897  * getDiffusiveFluxBoundaryConditions):
6898  */
6899 
6900  /* function exit code */
6901  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6902  goto __pyx_L0;
6903  __pyx_L1_error:;
6904  __Pyx_XDECREF(__pyx_t_1);
6905  __Pyx_XDECREF(__pyx_t_2);
6906  __Pyx_XDECREF(__pyx_t_3);
6907  __Pyx_XDECREF(__pyx_t_5);
6908  __Pyx_AddTraceback("ADR.NumericalFlux_NIPG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6909  __pyx_r = NULL;
6910  __pyx_L0:;
6911  __Pyx_XGIVEREF(__pyx_r);
6912  __Pyx_RefNannyFinishContext();
6913  return __pyx_r;
6914 }
6915 
6916 /* "ADR.pyx":472
6917  * """
6918  * from proteus.ctransportCoefficients import L2projectEvaluate
6919  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
6920  * timeVaryingCoefficients=False,
6921  * forceStrongDirichlet=False,
6922  */
6923 
6924 /* Python wrapper */
6925 static PyObject *__pyx_pw_3ADR_12Coefficients_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6926 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12Coefficients_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
6927 static PyObject *__pyx_pw_3ADR_12Coefficients_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6928  PyObject *__pyx_v_self = 0;
6929  PyObject *__pyx_v_aOfX = 0;
6930  PyObject *__pyx_v_fOfX = 0;
6931  PyObject *__pyx_v_velocity = 0;
6932  PyObject *__pyx_v_nc = 0;
6933  PyObject *__pyx_v_nd = 0;
6934  PyObject *__pyx_v_l2proj = 0;
6935  PyObject *__pyx_v_timeVaryingCoefficients = 0;
6936  PyObject *__pyx_v_forceStrongDirichlet = 0;
6937  PyObject *__pyx_v_useMetrics = 0;
6938  PyObject *__pyx_v_sc_uref = 0;
6939  PyObject *__pyx_v_sc_beta = 0;
6940  PyObject *__pyx_r = 0;
6941  __Pyx_RefNannyDeclarations
6942  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
6943  {
6944  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_aOfX,&__pyx_n_s_fOfX,&__pyx_n_s_velocity,&__pyx_n_s_nc,&__pyx_n_s_nd,&__pyx_n_s_l2proj,&__pyx_n_s_timeVaryingCoefficients,&__pyx_n_s_forceStrongDirichlet,&__pyx_n_s_useMetrics,&__pyx_n_s_sc_uref,&__pyx_n_s_sc_beta,0};
6945  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
6946  values[3] = ((PyObject *)((PyObject *)Py_None));
6947  values[4] = ((PyObject *)((PyObject *)__pyx_int_1));
6948  values[5] = ((PyObject *)((PyObject *)__pyx_int_2));
6949  values[6] = ((PyObject *)((PyObject *)Py_None));
6950 
6951  /* "ADR.pyx":473
6952  * from proteus.ctransportCoefficients import L2projectEvaluate
6953  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
6954  * timeVaryingCoefficients=False, # <<<<<<<<<<<<<<
6955  * forceStrongDirichlet=False,
6956  * useMetrics=0.0,
6957  */
6958  values[7] = ((PyObject *)((PyObject *)Py_False));
6959 
6960  /* "ADR.pyx":474
6961  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
6962  * timeVaryingCoefficients=False,
6963  * forceStrongDirichlet=False, # <<<<<<<<<<<<<<
6964  * useMetrics=0.0,
6965  * sc_uref=1.0,
6966  */
6967  values[8] = ((PyObject *)((PyObject *)Py_False));
6968  values[9] = ((PyObject *)((PyObject*)__pyx_float_0_0));
6969  values[10] = ((PyObject *)((PyObject*)__pyx_float_1_0));
6970  values[11] = ((PyObject *)((PyObject*)__pyx_float_1_0));
6971  if (unlikely(__pyx_kwds)) {
6972  Py_ssize_t kw_args;
6973  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6974  switch (pos_args) {
6975  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
6976  CYTHON_FALLTHROUGH;
6977  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
6978  CYTHON_FALLTHROUGH;
6979  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
6980  CYTHON_FALLTHROUGH;
6981  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
6982  CYTHON_FALLTHROUGH;
6983  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
6984  CYTHON_FALLTHROUGH;
6985  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
6986  CYTHON_FALLTHROUGH;
6987  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6988  CYTHON_FALLTHROUGH;
6989  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6990  CYTHON_FALLTHROUGH;
6991  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6992  CYTHON_FALLTHROUGH;
6993  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6994  CYTHON_FALLTHROUGH;
6995  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6996  CYTHON_FALLTHROUGH;
6997  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6998  CYTHON_FALLTHROUGH;
6999  case 0: break;
7000  default: goto __pyx_L5_argtuple_error;
7001  }
7002  kw_args = PyDict_Size(__pyx_kwds);
7003  switch (pos_args) {
7004  case 0:
7005  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
7006  else goto __pyx_L5_argtuple_error;
7007  CYTHON_FALLTHROUGH;
7008  case 1:
7009  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aOfX)) != 0)) kw_args--;
7010  else {
7011  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, 1); __PYX_ERR(1, 472, __pyx_L3_error)
7012  }
7013  CYTHON_FALLTHROUGH;
7014  case 2:
7015  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fOfX)) != 0)) kw_args--;
7016  else {
7017  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, 2); __PYX_ERR(1, 472, __pyx_L3_error)
7018  }
7019  CYTHON_FALLTHROUGH;
7020  case 3:
7021  if (kw_args > 0) {
7022  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_velocity);
7023  if (value) { values[3] = value; kw_args--; }
7024  }
7025  CYTHON_FALLTHROUGH;
7026  case 4:
7027  if (kw_args > 0) {
7028  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nc);
7029  if (value) { values[4] = value; kw_args--; }
7030  }
7031  CYTHON_FALLTHROUGH;
7032  case 5:
7033  if (kw_args > 0) {
7034  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nd);
7035  if (value) { values[5] = value; kw_args--; }
7036  }
7037  CYTHON_FALLTHROUGH;
7038  case 6:
7039  if (kw_args > 0) {
7040  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l2proj);
7041  if (value) { values[6] = value; kw_args--; }
7042  }
7043  CYTHON_FALLTHROUGH;
7044  case 7:
7045  if (kw_args > 0) {
7046  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeVaryingCoefficients);
7047  if (value) { values[7] = value; kw_args--; }
7048  }
7049  CYTHON_FALLTHROUGH;
7050  case 8:
7051  if (kw_args > 0) {
7052  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_forceStrongDirichlet);
7053  if (value) { values[8] = value; kw_args--; }
7054  }
7055  CYTHON_FALLTHROUGH;
7056  case 9:
7057  if (kw_args > 0) {
7058  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useMetrics);
7059  if (value) { values[9] = value; kw_args--; }
7060  }
7061  CYTHON_FALLTHROUGH;
7062  case 10:
7063  if (kw_args > 0) {
7064  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sc_uref);
7065  if (value) { values[10] = value; kw_args--; }
7066  }
7067  CYTHON_FALLTHROUGH;
7068  case 11:
7069  if (kw_args > 0) {
7070  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sc_beta);
7071  if (value) { values[11] = value; kw_args--; }
7072  }
7073  }
7074  if (unlikely(kw_args > 0)) {
7075  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 472, __pyx_L3_error)
7076  }
7077  } else {
7078  switch (PyTuple_GET_SIZE(__pyx_args)) {
7079  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
7080  CYTHON_FALLTHROUGH;
7081  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
7082  CYTHON_FALLTHROUGH;
7083  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
7084  CYTHON_FALLTHROUGH;
7085  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
7086  CYTHON_FALLTHROUGH;
7087  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
7088  CYTHON_FALLTHROUGH;
7089  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
7090  CYTHON_FALLTHROUGH;
7091  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
7092  CYTHON_FALLTHROUGH;
7093  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
7094  CYTHON_FALLTHROUGH;
7095  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7096  CYTHON_FALLTHROUGH;
7097  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7098  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7099  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7100  break;
7101  default: goto __pyx_L5_argtuple_error;
7102  }
7103  }
7104  __pyx_v_self = values[0];
7105  __pyx_v_aOfX = values[1];
7106  __pyx_v_fOfX = values[2];
7107  __pyx_v_velocity = values[3];
7108  __pyx_v_nc = values[4];
7109  __pyx_v_nd = values[5];
7110  __pyx_v_l2proj = values[6];
7111  __pyx_v_timeVaryingCoefficients = values[7];
7112  __pyx_v_forceStrongDirichlet = values[8];
7113  __pyx_v_useMetrics = values[9];
7114  __pyx_v_sc_uref = values[10];
7115  __pyx_v_sc_beta = values[11];
7116  }
7117  goto __pyx_L4_argument_unpacking_done;
7118  __pyx_L5_argtuple_error:;
7119  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 472, __pyx_L3_error)
7120  __pyx_L3_error:;
7121  __Pyx_AddTraceback("ADR.Coefficients.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7122  __Pyx_RefNannyFinishContext();
7123  return NULL;
7124  __pyx_L4_argument_unpacking_done:;
7125  __pyx_r = __pyx_pf_3ADR_12Coefficients___init__(__pyx_self, __pyx_v_self, __pyx_v_aOfX, __pyx_v_fOfX, __pyx_v_velocity, __pyx_v_nc, __pyx_v_nd, __pyx_v_l2proj, __pyx_v_timeVaryingCoefficients, __pyx_v_forceStrongDirichlet, __pyx_v_useMetrics, __pyx_v_sc_uref, __pyx_v_sc_beta);
7126 
7127  /* "ADR.pyx":472
7128  * """
7129  * from proteus.ctransportCoefficients import L2projectEvaluate
7130  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
7131  * timeVaryingCoefficients=False,
7132  * forceStrongDirichlet=False,
7133  */
7134 
7135  /* function exit code */
7136  __Pyx_RefNannyFinishContext();
7137  return __pyx_r;
7138 }
7139 
7140 static PyObject *__pyx_pf_3ADR_12Coefficients___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_aOfX, PyObject *__pyx_v_fOfX, PyObject *__pyx_v_velocity, PyObject *__pyx_v_nc, PyObject *__pyx_v_nd, PyObject *__pyx_v_l2proj, PyObject *__pyx_v_timeVaryingCoefficients, PyObject *__pyx_v_forceStrongDirichlet, PyObject *__pyx_v_useMetrics, PyObject *__pyx_v_sc_uref, PyObject *__pyx_v_sc_beta) {
7141  PyObject *__pyx_v_mass = NULL;
7142  PyObject *__pyx_v_advection = NULL;
7143  PyObject *__pyx_v_diffusion = NULL;
7144  PyObject *__pyx_v_potential = NULL;
7145  PyObject *__pyx_v_reaction = NULL;
7146  PyObject *__pyx_v_hamiltonian = NULL;
7147  PyObject *__pyx_v_i = NULL;
7148  PyObject *__pyx_v_sdInfo = NULL;
7149  CYTHON_UNUSED PyObject *__pyx_v_row = NULL;
7150  PyObject *__pyx_r = NULL;
7151  __Pyx_RefNannyDeclarations
7152  PyObject *__pyx_t_1 = NULL;
7153  PyObject *__pyx_t_2 = NULL;
7154  Py_ssize_t __pyx_t_3;
7155  PyObject *(*__pyx_t_4)(PyObject *);
7156  PyObject *__pyx_t_5 = NULL;
7157  PyObject *__pyx_t_6 = NULL;
7158  PyObject *__pyx_t_7 = NULL;
7159  PyObject *__pyx_t_8 = NULL;
7160  PyObject *__pyx_t_9 = NULL;
7161  __Pyx_RefNannySetupContext("__init__", 0);
7162 
7163  /* "ADR.pyx":478
7164  * sc_uref=1.0,
7165  * sc_beta=1.0):
7166  * self.useMetrics = useMetrics # <<<<<<<<<<<<<<
7167  * self.forceStrongDirichlet=forceStrongDirichlet
7168  * self.aOfX = aOfX
7169  */
7170  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_useMetrics, __pyx_v_useMetrics) < 0) __PYX_ERR(1, 478, __pyx_L1_error)
7171 
7172  /* "ADR.pyx":479
7173  * sc_beta=1.0):
7174  * self.useMetrics = useMetrics
7175  * self.forceStrongDirichlet=forceStrongDirichlet # <<<<<<<<<<<<<<
7176  * self.aOfX = aOfX
7177  * self.fOfX = fOfX
7178  */
7179  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongDirichlet, __pyx_v_forceStrongDirichlet) < 0) __PYX_ERR(1, 479, __pyx_L1_error)
7180 
7181  /* "ADR.pyx":480
7182  * self.useMetrics = useMetrics
7183  * self.forceStrongDirichlet=forceStrongDirichlet
7184  * self.aOfX = aOfX # <<<<<<<<<<<<<<
7185  * self.fOfX = fOfX
7186  * self.velocity=velocity
7187  */
7188  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_aOfX, __pyx_v_aOfX) < 0) __PYX_ERR(1, 480, __pyx_L1_error)
7189 
7190  /* "ADR.pyx":481
7191  * self.forceStrongDirichlet=forceStrongDirichlet
7192  * self.aOfX = aOfX
7193  * self.fOfX = fOfX # <<<<<<<<<<<<<<
7194  * self.velocity=velocity
7195  * self.nd = nd
7196  */
7197  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fOfX, __pyx_v_fOfX) < 0) __PYX_ERR(1, 481, __pyx_L1_error)
7198 
7199  /* "ADR.pyx":482
7200  * self.aOfX = aOfX
7201  * self.fOfX = fOfX
7202  * self.velocity=velocity # <<<<<<<<<<<<<<
7203  * self.nd = nd
7204  * self.l2proj = l2proj
7205  */
7206  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_velocity, __pyx_v_velocity) < 0) __PYX_ERR(1, 482, __pyx_L1_error)
7207 
7208  /* "ADR.pyx":483
7209  * self.fOfX = fOfX
7210  * self.velocity=velocity
7211  * self.nd = nd # <<<<<<<<<<<<<<
7212  * self.l2proj = l2proj
7213  * self.timeVaryingCoefficients=timeVaryingCoefficients
7214  */
7215  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nd, __pyx_v_nd) < 0) __PYX_ERR(1, 483, __pyx_L1_error)
7216 
7217  /* "ADR.pyx":484
7218  * self.velocity=velocity
7219  * self.nd = nd
7220  * self.l2proj = l2proj # <<<<<<<<<<<<<<
7221  * self.timeVaryingCoefficients=timeVaryingCoefficients
7222  * self.sc_uref=sc_uref
7223  */
7224  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_l2proj, __pyx_v_l2proj) < 0) __PYX_ERR(1, 484, __pyx_L1_error)
7225 
7226  /* "ADR.pyx":485
7227  * self.nd = nd
7228  * self.l2proj = l2proj
7229  * self.timeVaryingCoefficients=timeVaryingCoefficients # <<<<<<<<<<<<<<
7230  * self.sc_uref=sc_uref
7231  * self.sc_beta=sc_beta
7232  */
7233  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeVaryingCoefficients, __pyx_v_timeVaryingCoefficients) < 0) __PYX_ERR(1, 485, __pyx_L1_error)
7234 
7235  /* "ADR.pyx":486
7236  * self.l2proj = l2proj
7237  * self.timeVaryingCoefficients=timeVaryingCoefficients
7238  * self.sc_uref=sc_uref # <<<<<<<<<<<<<<
7239  * self.sc_beta=sc_beta
7240  * mass = {}
7241  */
7242  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sc_uref, __pyx_v_sc_uref) < 0) __PYX_ERR(1, 486, __pyx_L1_error)
7243 
7244  /* "ADR.pyx":487
7245  * self.timeVaryingCoefficients=timeVaryingCoefficients
7246  * self.sc_uref=sc_uref
7247  * self.sc_beta=sc_beta # <<<<<<<<<<<<<<
7248  * mass = {}
7249  * advection = {}
7250  */
7251  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sc_beta, __pyx_v_sc_beta) < 0) __PYX_ERR(1, 487, __pyx_L1_error)
7252 
7253  /* "ADR.pyx":488
7254  * self.sc_uref=sc_uref
7255  * self.sc_beta=sc_beta
7256  * mass = {} # <<<<<<<<<<<<<<
7257  * advection = {}
7258  * diffusion = {}
7259  */
7260  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error)
7261  __Pyx_GOTREF(__pyx_t_1);
7262  __pyx_v_mass = ((PyObject*)__pyx_t_1);
7263  __pyx_t_1 = 0;
7264 
7265  /* "ADR.pyx":489
7266  * self.sc_beta=sc_beta
7267  * mass = {}
7268  * advection = {} # <<<<<<<<<<<<<<
7269  * diffusion = {}
7270  * potential = {}
7271  */
7272  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L1_error)
7273  __Pyx_GOTREF(__pyx_t_1);
7274  __pyx_v_advection = ((PyObject*)__pyx_t_1);
7275  __pyx_t_1 = 0;
7276 
7277  /* "ADR.pyx":490
7278  * mass = {}
7279  * advection = {}
7280  * diffusion = {} # <<<<<<<<<<<<<<
7281  * potential = {}
7282  * reaction = {}
7283  */
7284  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error)
7285  __Pyx_GOTREF(__pyx_t_1);
7286  __pyx_v_diffusion = ((PyObject*)__pyx_t_1);
7287  __pyx_t_1 = 0;
7288 
7289  /* "ADR.pyx":491
7290  * advection = {}
7291  * diffusion = {}
7292  * potential = {} # <<<<<<<<<<<<<<
7293  * reaction = {}
7294  * hamiltonian = {}
7295  */
7296  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error)
7297  __Pyx_GOTREF(__pyx_t_1);
7298  __pyx_v_potential = ((PyObject*)__pyx_t_1);
7299  __pyx_t_1 = 0;
7300 
7301  /* "ADR.pyx":492
7302  * diffusion = {}
7303  * potential = {}
7304  * reaction = {} # <<<<<<<<<<<<<<
7305  * hamiltonian = {}
7306  * for i in range(nc):
7307  */
7308  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
7309  __Pyx_GOTREF(__pyx_t_1);
7310  __pyx_v_reaction = ((PyObject*)__pyx_t_1);
7311  __pyx_t_1 = 0;
7312 
7313  /* "ADR.pyx":493
7314  * potential = {}
7315  * reaction = {}
7316  * hamiltonian = {} # <<<<<<<<<<<<<<
7317  * for i in range(nc):
7318  * diffusion[i] = {i : {i:'constant'}}
7319  */
7320  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error)
7321  __Pyx_GOTREF(__pyx_t_1);
7322  __pyx_v_hamiltonian = ((PyObject*)__pyx_t_1);
7323  __pyx_t_1 = 0;
7324 
7325  /* "ADR.pyx":494
7326  * reaction = {}
7327  * hamiltonian = {}
7328  * for i in range(nc): # <<<<<<<<<<<<<<
7329  * diffusion[i] = {i : {i:'constant'}}
7330  * reaction[i] = {i : 'constant'}
7331  */
7332  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error)
7333  __Pyx_GOTREF(__pyx_t_1);
7334  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
7335  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
7336  __pyx_t_4 = NULL;
7337  } else {
7338  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 494, __pyx_L1_error)
7339  __Pyx_GOTREF(__pyx_t_2);
7340  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 494, __pyx_L1_error)
7341  }
7342  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7343  for (;;) {
7344  if (likely(!__pyx_t_4)) {
7345  if (likely(PyList_CheckExact(__pyx_t_2))) {
7346  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
7347  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7348  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 494, __pyx_L1_error)
7349  #else
7350  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error)
7351  __Pyx_GOTREF(__pyx_t_1);
7352  #endif
7353  } else {
7354  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
7355  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7356  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 494, __pyx_L1_error)
7357  #else
7358  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error)
7359  __Pyx_GOTREF(__pyx_t_1);
7360  #endif
7361  }
7362  } else {
7363  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
7364  if (unlikely(!__pyx_t_1)) {
7365  PyObject* exc_type = PyErr_Occurred();
7366  if (exc_type) {
7367  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7368  else __PYX_ERR(1, 494, __pyx_L1_error)
7369  }
7370  break;
7371  }
7372  __Pyx_GOTREF(__pyx_t_1);
7373  }
7374  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
7375  __pyx_t_1 = 0;
7376 
7377  /* "ADR.pyx":495
7378  * hamiltonian = {}
7379  * for i in range(nc):
7380  * diffusion[i] = {i : {i:'constant'}} # <<<<<<<<<<<<<<
7381  * reaction[i] = {i : 'constant'}
7382  * advection[i] = {i : 'linear'} #now include for gravity type terms
7383  */
7384  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
7385  __Pyx_GOTREF(__pyx_t_1);
7386  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L1_error)
7387  __Pyx_GOTREF(__pyx_t_5);
7388  if (PyDict_SetItem(__pyx_t_5, __pyx_v_i, __pyx_n_s_constant) < 0) __PYX_ERR(1, 495, __pyx_L1_error)
7389  if (PyDict_SetItem(__pyx_t_1, __pyx_v_i, __pyx_t_5) < 0) __PYX_ERR(1, 495, __pyx_L1_error)
7390  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7391  if (unlikely(PyDict_SetItem(__pyx_v_diffusion, __pyx_v_i, __pyx_t_1) < 0)) __PYX_ERR(1, 495, __pyx_L1_error)
7392  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7393 
7394  /* "ADR.pyx":496
7395  * for i in range(nc):
7396  * diffusion[i] = {i : {i:'constant'}}
7397  * reaction[i] = {i : 'constant'} # <<<<<<<<<<<<<<
7398  * advection[i] = {i : 'linear'} #now include for gravity type terms
7399  * potential[i] = {i : 'u'}
7400  */
7401  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error)
7402  __Pyx_GOTREF(__pyx_t_1);
7403  if (PyDict_SetItem(__pyx_t_1, __pyx_v_i, __pyx_n_s_constant) < 0) __PYX_ERR(1, 496, __pyx_L1_error)
7404  if (unlikely(PyDict_SetItem(__pyx_v_reaction, __pyx_v_i, __pyx_t_1) < 0)) __PYX_ERR(1, 496, __pyx_L1_error)
7405  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7406 
7407  /* "ADR.pyx":497
7408  * diffusion[i] = {i : {i:'constant'}}
7409  * reaction[i] = {i : 'constant'}
7410  * advection[i] = {i : 'linear'} #now include for gravity type terms # <<<<<<<<<<<<<<
7411  * potential[i] = {i : 'u'}
7412  * #end i
7413  */
7414  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L1_error)
7415  __Pyx_GOTREF(__pyx_t_1);
7416  if (PyDict_SetItem(__pyx_t_1, __pyx_v_i, __pyx_n_s_linear) < 0) __PYX_ERR(1, 497, __pyx_L1_error)
7417  if (unlikely(PyDict_SetItem(__pyx_v_advection, __pyx_v_i, __pyx_t_1) < 0)) __PYX_ERR(1, 497, __pyx_L1_error)
7418  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7419 
7420  /* "ADR.pyx":498
7421  * reaction[i] = {i : 'constant'}
7422  * advection[i] = {i : 'linear'} #now include for gravity type terms
7423  * potential[i] = {i : 'u'} # <<<<<<<<<<<<<<
7424  * #end i
7425  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7426  */
7427  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 498, __pyx_L1_error)
7428  __Pyx_GOTREF(__pyx_t_1);
7429  if (PyDict_SetItem(__pyx_t_1, __pyx_v_i, __pyx_n_s_u) < 0) __PYX_ERR(1, 498, __pyx_L1_error)
7430  if (unlikely(PyDict_SetItem(__pyx_v_potential, __pyx_v_i, __pyx_t_1) < 0)) __PYX_ERR(1, 498, __pyx_L1_error)
7431  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7432 
7433  /* "ADR.pyx":494
7434  * reaction = {}
7435  * hamiltonian = {}
7436  * for i in range(nc): # <<<<<<<<<<<<<<
7437  * diffusion[i] = {i : {i:'constant'}}
7438  * reaction[i] = {i : 'constant'}
7439  */
7440  }
7441  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7442 
7443  /* "ADR.pyx":500
7444  * potential[i] = {i : 'u'}
7445  * #end i
7446  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
7447  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7448  * TC_base.__init__(self,
7449  */
7450  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 500, __pyx_L1_error)
7451  __Pyx_GOTREF(__pyx_t_2);
7452  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error)
7453  __Pyx_GOTREF(__pyx_t_1);
7454  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 500, __pyx_L1_error)
7455  __Pyx_GOTREF(__pyx_t_5);
7456  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7457  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error)
7458  __Pyx_GOTREF(__pyx_t_1);
7459  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start, __pyx_int_0) < 0) __PYX_ERR(1, 500, __pyx_L1_error)
7460  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 500, __pyx_L1_error)
7461  __Pyx_GOTREF(__pyx_t_6);
7462  __pyx_t_7 = PyNumber_Power(__pyx_t_6, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 500, __pyx_L1_error)
7463  __Pyx_GOTREF(__pyx_t_7);
7464  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7465  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_7, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 500, __pyx_L1_error)
7466  __Pyx_GOTREF(__pyx_t_6);
7467  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7468  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stop, __pyx_t_6) < 0) __PYX_ERR(1, 500, __pyx_L1_error)
7469  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7470  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 500, __pyx_L1_error)
7471  __Pyx_GOTREF(__pyx_t_6);
7472  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_step, __pyx_t_6) < 0) __PYX_ERR(1, 500, __pyx_L1_error)
7473  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7474  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_i) < 0) __PYX_ERR(1, 500, __pyx_L1_error)
7475  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 500, __pyx_L1_error)
7476  __Pyx_GOTREF(__pyx_t_6);
7477  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7478  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7479 
7480  /* "ADR.pyx":501
7481  * #end i
7482  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7483  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))} # <<<<<<<<<<<<<<
7484  * TC_base.__init__(self,
7485  * nc,
7486  */
7487  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 501, __pyx_L1_error)
7488  __Pyx_GOTREF(__pyx_t_1);
7489  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 501, __pyx_L1_error)
7490  __Pyx_GOTREF(__pyx_t_5);
7491  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7492  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 501, __pyx_L1_error)
7493  __Pyx_GOTREF(__pyx_t_1);
7494  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 501, __pyx_L1_error)
7495  __Pyx_GOTREF(__pyx_t_7);
7496  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 501, __pyx_L1_error)
7497  __Pyx_GOTREF(__pyx_t_8);
7498  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7499  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
7500  __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_3 = 0;
7501  __pyx_t_4 = NULL;
7502  } else {
7503  __pyx_t_3 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 501, __pyx_L1_error)
7504  __Pyx_GOTREF(__pyx_t_7);
7505  __pyx_t_4 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 501, __pyx_L1_error)
7506  }
7507  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7508  for (;;) {
7509  if (likely(!__pyx_t_4)) {
7510  if (likely(PyList_CheckExact(__pyx_t_7))) {
7511  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_7)) break;
7512  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7513  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 501, __pyx_L1_error)
7514  #else
7515  __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 501, __pyx_L1_error)
7516  __Pyx_GOTREF(__pyx_t_8);
7517  #endif
7518  } else {
7519  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
7520  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7521  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_3); __Pyx_INCREF(__pyx_t_8); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 501, __pyx_L1_error)
7522  #else
7523  __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 501, __pyx_L1_error)
7524  __Pyx_GOTREF(__pyx_t_8);
7525  #endif
7526  }
7527  } else {
7528  __pyx_t_8 = __pyx_t_4(__pyx_t_7);
7529  if (unlikely(!__pyx_t_8)) {
7530  PyObject* exc_type = PyErr_Occurred();
7531  if (exc_type) {
7532  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7533  else __PYX_ERR(1, 501, __pyx_L1_error)
7534  }
7535  break;
7536  }
7537  __Pyx_GOTREF(__pyx_t_8);
7538  }
7539  __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_8);
7540  __pyx_t_8 = 0;
7541  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 501, __pyx_L1_error)
7542  __Pyx_GOTREF(__pyx_t_8);
7543  __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 501, __pyx_L1_error)
7544  __Pyx_GOTREF(__pyx_t_9);
7545  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7546  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(1, 501, __pyx_L1_error)
7547  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7548  }
7549  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7550  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 501, __pyx_L1_error)
7551  __Pyx_GOTREF(__pyx_t_7);
7552  __Pyx_GIVEREF(__pyx_t_1);
7553  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
7554  __pyx_t_1 = 0;
7555  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 501, __pyx_L1_error)
7556  __Pyx_GOTREF(__pyx_t_1);
7557  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_i) < 0) __PYX_ERR(1, 501, __pyx_L1_error)
7558  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 501, __pyx_L1_error)
7559  __Pyx_GOTREF(__pyx_t_9);
7560  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7561  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7562  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7563 
7564  /* "ADR.pyx":500
7565  * potential[i] = {i : 'u'}
7566  * #end i
7567  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
7568  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7569  * TC_base.__init__(self,
7570  */
7571  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error)
7572  __Pyx_GOTREF(__pyx_t_1);
7573  __Pyx_GIVEREF(__pyx_t_6);
7574  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
7575  __Pyx_GIVEREF(__pyx_t_9);
7576  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9);
7577  __pyx_t_6 = 0;
7578  __pyx_t_9 = 0;
7579  if (PyDict_SetItem(__pyx_t_2, __pyx_tuple__4, __pyx_t_1) < 0) __PYX_ERR(1, 500, __pyx_L1_error)
7580  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7581  __pyx_v_sdInfo = ((PyObject*)__pyx_t_2);
7582  __pyx_t_2 = 0;
7583 
7584  /* "ADR.pyx":502
7585  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7586  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7587  * TC_base.__init__(self, # <<<<<<<<<<<<<<
7588  * nc,
7589  * mass,
7590  */
7591  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TC_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 502, __pyx_L1_error)
7592  __Pyx_GOTREF(__pyx_t_2);
7593  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L1_error)
7594  __Pyx_GOTREF(__pyx_t_1);
7595  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7596 
7597  /* "ADR.pyx":509
7598  * potential,
7599  * reaction,
7600  * hamiltonian, # <<<<<<<<<<<<<<
7601  * variableNames=['u'],
7602  * sparseDiffusionTensors=sdInfo,
7603  */
7604  __pyx_t_2 = PyTuple_New(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 502, __pyx_L1_error)
7605  __Pyx_GOTREF(__pyx_t_2);
7606  __Pyx_INCREF(__pyx_v_self);
7607  __Pyx_GIVEREF(__pyx_v_self);
7608  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
7609  __Pyx_INCREF(__pyx_v_nc);
7610  __Pyx_GIVEREF(__pyx_v_nc);
7611  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_nc);
7612  __Pyx_INCREF(__pyx_v_mass);
7613  __Pyx_GIVEREF(__pyx_v_mass);
7614  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_mass);
7615  __Pyx_INCREF(__pyx_v_advection);
7616  __Pyx_GIVEREF(__pyx_v_advection);
7617  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_advection);
7618  __Pyx_INCREF(__pyx_v_diffusion);
7619  __Pyx_GIVEREF(__pyx_v_diffusion);
7620  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_diffusion);
7621  __Pyx_INCREF(__pyx_v_potential);
7622  __Pyx_GIVEREF(__pyx_v_potential);
7623  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_potential);
7624  __Pyx_INCREF(__pyx_v_reaction);
7625  __Pyx_GIVEREF(__pyx_v_reaction);
7626  PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_v_reaction);
7627  __Pyx_INCREF(__pyx_v_hamiltonian);
7628  __Pyx_GIVEREF(__pyx_v_hamiltonian);
7629  PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_v_hamiltonian);
7630 
7631  /* "ADR.pyx":510
7632  * reaction,
7633  * hamiltonian,
7634  * variableNames=['u'], # <<<<<<<<<<<<<<
7635  * sparseDiffusionTensors=sdInfo,
7636  * useSparseDiffusion=True,
7637  */
7638  __pyx_t_9 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 510, __pyx_L1_error)
7639  __Pyx_GOTREF(__pyx_t_9);
7640  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 510, __pyx_L1_error)
7641  __Pyx_GOTREF(__pyx_t_6);
7642  __Pyx_INCREF(__pyx_n_s_u);
7643  __Pyx_GIVEREF(__pyx_n_s_u);
7644  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_u);
7645  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_variableNames, __pyx_t_6) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
7646  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7647 
7648  /* "ADR.pyx":511
7649  * hamiltonian,
7650  * variableNames=['u'],
7651  * sparseDiffusionTensors=sdInfo, # <<<<<<<<<<<<<<
7652  * useSparseDiffusion=True,
7653  * movingDomain=False)
7654  */
7655  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_sparseDiffusionTensors, __pyx_v_sdInfo) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
7656 
7657  /* "ADR.pyx":512
7658  * variableNames=['u'],
7659  * sparseDiffusionTensors=sdInfo,
7660  * useSparseDiffusion=True, # <<<<<<<<<<<<<<
7661  * movingDomain=False)
7662  * def initializeElementQuadrature(self,t,cq):
7663  */
7664  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_useSparseDiffusion, Py_True) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
7665 
7666  /* "ADR.pyx":513
7667  * sparseDiffusionTensors=sdInfo,
7668  * useSparseDiffusion=True,
7669  * movingDomain=False) # <<<<<<<<<<<<<<
7670  * def initializeElementQuadrature(self,t,cq):
7671  * nd = self.nd
7672  */
7673  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_movingDomain, Py_False) < 0) __PYX_ERR(1, 510, __pyx_L1_error)
7674 
7675  /* "ADR.pyx":502
7676  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'),
7677  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
7678  * TC_base.__init__(self, # <<<<<<<<<<<<<<
7679  * nc,
7680  * mass,
7681  */
7682  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 502, __pyx_L1_error)
7683  __Pyx_GOTREF(__pyx_t_6);
7684  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7685  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7686  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7687  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7688 
7689  /* "ADR.pyx":472
7690  * """
7691  * from proteus.ctransportCoefficients import L2projectEvaluate
7692  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
7693  * timeVaryingCoefficients=False,
7694  * forceStrongDirichlet=False,
7695  */
7696 
7697  /* function exit code */
7698  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7699  goto __pyx_L0;
7700  __pyx_L1_error:;
7701  __Pyx_XDECREF(__pyx_t_1);
7702  __Pyx_XDECREF(__pyx_t_2);
7703  __Pyx_XDECREF(__pyx_t_5);
7704  __Pyx_XDECREF(__pyx_t_6);
7705  __Pyx_XDECREF(__pyx_t_7);
7706  __Pyx_XDECREF(__pyx_t_8);
7707  __Pyx_XDECREF(__pyx_t_9);
7708  __Pyx_AddTraceback("ADR.Coefficients.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7709  __pyx_r = NULL;
7710  __pyx_L0:;
7711  __Pyx_XDECREF(__pyx_v_mass);
7712  __Pyx_XDECREF(__pyx_v_advection);
7713  __Pyx_XDECREF(__pyx_v_diffusion);
7714  __Pyx_XDECREF(__pyx_v_potential);
7715  __Pyx_XDECREF(__pyx_v_reaction);
7716  __Pyx_XDECREF(__pyx_v_hamiltonian);
7717  __Pyx_XDECREF(__pyx_v_i);
7718  __Pyx_XDECREF(__pyx_v_sdInfo);
7719  __Pyx_XDECREF(__pyx_v_row);
7720  __Pyx_XGIVEREF(__pyx_r);
7721  __Pyx_RefNannyFinishContext();
7722  return __pyx_r;
7723 }
7724 
7725 /* "ADR.pyx":514
7726  * useSparseDiffusion=True,
7727  * movingDomain=False)
7728  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
7729  * nd = self.nd
7730  * for ci in range(self.nc):
7731  */
7732 
7733 /* Python wrapper */
7734 static PyObject *__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7735 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_3initializeElementQuadrature = {"initializeElementQuadrature", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
7736 static PyObject *__pyx_pw_3ADR_12Coefficients_3initializeElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7737  PyObject *__pyx_v_self = 0;
7738  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
7739  PyObject *__pyx_v_cq = 0;
7740  PyObject *__pyx_r = 0;
7741  __Pyx_RefNannyDeclarations
7742  __Pyx_RefNannySetupContext("initializeElementQuadrature (wrapper)", 0);
7743  {
7744  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cq,0};
7745  PyObject* values[3] = {0,0,0};
7746  if (unlikely(__pyx_kwds)) {
7747  Py_ssize_t kw_args;
7748  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7749  switch (pos_args) {
7750  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7751  CYTHON_FALLTHROUGH;
7752  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7753  CYTHON_FALLTHROUGH;
7754  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7755  CYTHON_FALLTHROUGH;
7756  case 0: break;
7757  default: goto __pyx_L5_argtuple_error;
7758  }
7759  kw_args = PyDict_Size(__pyx_kwds);
7760  switch (pos_args) {
7761  case 0:
7762  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
7763  else goto __pyx_L5_argtuple_error;
7764  CYTHON_FALLTHROUGH;
7765  case 1:
7766  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
7767  else {
7768  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, 1); __PYX_ERR(1, 514, __pyx_L3_error)
7769  }
7770  CYTHON_FALLTHROUGH;
7771  case 2:
7772  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cq)) != 0)) kw_args--;
7773  else {
7774  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, 2); __PYX_ERR(1, 514, __pyx_L3_error)
7775  }
7776  }
7777  if (unlikely(kw_args > 0)) {
7778  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementQuadrature") < 0)) __PYX_ERR(1, 514, __pyx_L3_error)
7779  }
7780  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
7781  goto __pyx_L5_argtuple_error;
7782  } else {
7783  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7784  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7785  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7786  }
7787  __pyx_v_self = values[0];
7788  __pyx_v_t = values[1];
7789  __pyx_v_cq = values[2];
7790  }
7791  goto __pyx_L4_argument_unpacking_done;
7792  __pyx_L5_argtuple_error:;
7793  __Pyx_RaiseArgtupleInvalid("initializeElementQuadrature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 514, __pyx_L3_error)
7794  __pyx_L3_error:;
7795  __Pyx_AddTraceback("ADR.Coefficients.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
7796  __Pyx_RefNannyFinishContext();
7797  return NULL;
7798  __pyx_L4_argument_unpacking_done:;
7799  __pyx_r = __pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cq);
7800 
7801  /* function exit code */
7802  __Pyx_RefNannyFinishContext();
7803  return __pyx_r;
7804 }
7805 
7806 static PyObject *__pyx_pf_3ADR_12Coefficients_2initializeElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cq) {
7807  PyObject *__pyx_v_nd = NULL;
7808  PyObject *__pyx_v_ci = NULL;
7809  PyObject *__pyx_v_i = NULL;
7810  PyObject *__pyx_r = NULL;
7811  __Pyx_RefNannyDeclarations
7812  PyObject *__pyx_t_1 = NULL;
7813  PyObject *__pyx_t_2 = NULL;
7814  Py_ssize_t __pyx_t_3;
7815  PyObject *(*__pyx_t_4)(PyObject *);
7816  PyObject *__pyx_t_5 = NULL;
7817  PyObject *__pyx_t_6 = NULL;
7818  PyObject *__pyx_t_7 = NULL;
7819  int __pyx_t_8;
7820  int __pyx_t_9;
7821  Py_ssize_t __pyx_t_10;
7822  PyObject *(*__pyx_t_11)(PyObject *);
7823  PyObject *__pyx_t_12 = NULL;
7824  PyObject *__pyx_t_13 = NULL;
7825  PyObject *__pyx_t_14 = NULL;
7826  __Pyx_RefNannySetupContext("initializeElementQuadrature", 0);
7827 
7828  /* "ADR.pyx":515
7829  * movingDomain=False)
7830  * def initializeElementQuadrature(self,t,cq):
7831  * nd = self.nd # <<<<<<<<<<<<<<
7832  * for ci in range(self.nc):
7833  * if cq.has_key(('df',ci,ci)):
7834  */
7835  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 515, __pyx_L1_error)
7836  __Pyx_GOTREF(__pyx_t_1);
7837  __pyx_v_nd = __pyx_t_1;
7838  __pyx_t_1 = 0;
7839 
7840  /* "ADR.pyx":516
7841  * def initializeElementQuadrature(self,t,cq):
7842  * nd = self.nd
7843  * for ci in range(self.nc): # <<<<<<<<<<<<<<
7844  * if cq.has_key(('df',ci,ci)):
7845  * if self.velocity is not None:
7846  */
7847  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
7848  __Pyx_GOTREF(__pyx_t_1);
7849  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error)
7850  __Pyx_GOTREF(__pyx_t_2);
7851  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7852  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
7853  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
7854  __pyx_t_4 = NULL;
7855  } else {
7856  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
7857  __Pyx_GOTREF(__pyx_t_1);
7858  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 516, __pyx_L1_error)
7859  }
7860  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7861  for (;;) {
7862  if (likely(!__pyx_t_4)) {
7863  if (likely(PyList_CheckExact(__pyx_t_1))) {
7864  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
7865  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7866  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 516, __pyx_L1_error)
7867  #else
7868  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error)
7869  __Pyx_GOTREF(__pyx_t_2);
7870  #endif
7871  } else {
7872  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
7873  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7874  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 516, __pyx_L1_error)
7875  #else
7876  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error)
7877  __Pyx_GOTREF(__pyx_t_2);
7878  #endif
7879  }
7880  } else {
7881  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
7882  if (unlikely(!__pyx_t_2)) {
7883  PyObject* exc_type = PyErr_Occurred();
7884  if (exc_type) {
7885  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7886  else __PYX_ERR(1, 516, __pyx_L1_error)
7887  }
7888  break;
7889  }
7890  __Pyx_GOTREF(__pyx_t_2);
7891  }
7892  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
7893  __pyx_t_2 = 0;
7894 
7895  /* "ADR.pyx":517
7896  * nd = self.nd
7897  * for ci in range(self.nc):
7898  * if cq.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
7899  * if self.velocity is not None:
7900  * cq[('df',ci,ci)][...,:] = self.velocity
7901  */
7902  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cq, __pyx_n_s_has_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 517, __pyx_L1_error)
7903  __Pyx_GOTREF(__pyx_t_5);
7904  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 517, __pyx_L1_error)
7905  __Pyx_GOTREF(__pyx_t_6);
7906  __Pyx_INCREF(__pyx_n_s_df);
7907  __Pyx_GIVEREF(__pyx_n_s_df);
7908  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_df);
7909  __Pyx_INCREF(__pyx_v_ci);
7910  __Pyx_GIVEREF(__pyx_v_ci);
7911  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
7912  __Pyx_INCREF(__pyx_v_ci);
7913  __Pyx_GIVEREF(__pyx_v_ci);
7914  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
7915  __pyx_t_7 = NULL;
7916  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
7917  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
7918  if (likely(__pyx_t_7)) {
7919  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7920  __Pyx_INCREF(__pyx_t_7);
7921  __Pyx_INCREF(function);
7922  __Pyx_DECREF_SET(__pyx_t_5, function);
7923  }
7924  }
7925  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
7926  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7927  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7928  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 517, __pyx_L1_error)
7929  __Pyx_GOTREF(__pyx_t_2);
7930  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7931  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 517, __pyx_L1_error)
7932  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7933  if (__pyx_t_8) {
7934 
7935  /* "ADR.pyx":518
7936  * for ci in range(self.nc):
7937  * if cq.has_key(('df',ci,ci)):
7938  * if self.velocity is not None: # <<<<<<<<<<<<<<
7939  * cq[('df',ci,ci)][...,:] = self.velocity
7940  * else:
7941  */
7942  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 518, __pyx_L1_error)
7943  __Pyx_GOTREF(__pyx_t_2);
7944  __pyx_t_8 = (__pyx_t_2 != Py_None);
7945  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7946  __pyx_t_9 = (__pyx_t_8 != 0);
7947  if (__pyx_t_9) {
7948 
7949  /* "ADR.pyx":519
7950  * if cq.has_key(('df',ci,ci)):
7951  * if self.velocity is not None:
7952  * cq[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
7953  * else:
7954  * cq[('df',ci,ci)].flat[:] = 0.0
7955  */
7956  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 519, __pyx_L1_error)
7957  __Pyx_GOTREF(__pyx_t_2);
7958  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 519, __pyx_L1_error)
7959  __Pyx_GOTREF(__pyx_t_5);
7960  __Pyx_INCREF(__pyx_n_s_df);
7961  __Pyx_GIVEREF(__pyx_n_s_df);
7962  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_df);
7963  __Pyx_INCREF(__pyx_v_ci);
7964  __Pyx_GIVEREF(__pyx_v_ci);
7965  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_ci);
7966  __Pyx_INCREF(__pyx_v_ci);
7967  __Pyx_GIVEREF(__pyx_v_ci);
7968  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ci);
7969  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_cq, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 519, __pyx_L1_error)
7970  __Pyx_GOTREF(__pyx_t_6);
7971  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7972  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_tuple__5, __pyx_t_2) < 0)) __PYX_ERR(1, 519, __pyx_L1_error)
7973  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7974  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7975 
7976  /* "ADR.pyx":518
7977  * for ci in range(self.nc):
7978  * if cq.has_key(('df',ci,ci)):
7979  * if self.velocity is not None: # <<<<<<<<<<<<<<
7980  * cq[('df',ci,ci)][...,:] = self.velocity
7981  * else:
7982  */
7983  goto __pyx_L6;
7984  }
7985 
7986  /* "ADR.pyx":521
7987  * cq[('df',ci,ci)][...,:] = self.velocity
7988  * else:
7989  * cq[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
7990  * for i in range(len(cq[('r',ci)].flat)):
7991  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
7992  */
7993  /*else*/ {
7994  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 521, __pyx_L1_error)
7995  __Pyx_GOTREF(__pyx_t_2);
7996  __Pyx_INCREF(__pyx_n_s_df);
7997  __Pyx_GIVEREF(__pyx_n_s_df);
7998  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_df);
7999  __Pyx_INCREF(__pyx_v_ci);
8000  __Pyx_GIVEREF(__pyx_v_ci);
8001  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
8002  __Pyx_INCREF(__pyx_v_ci);
8003  __Pyx_GIVEREF(__pyx_v_ci);
8004  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ci);
8005  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_cq, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 521, __pyx_L1_error)
8006  __Pyx_GOTREF(__pyx_t_6);
8007  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8008  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 521, __pyx_L1_error)
8009  __Pyx_GOTREF(__pyx_t_2);
8010  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8011  if (__Pyx_PyObject_SetSlice(__pyx_t_2, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__3, 0, 0, 1) < 0) __PYX_ERR(1, 521, __pyx_L1_error)
8012  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8013  }
8014  __pyx_L6:;
8015 
8016  /* "ADR.pyx":517
8017  * nd = self.nd
8018  * for ci in range(self.nc):
8019  * if cq.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8020  * if self.velocity is not None:
8021  * cq[('df',ci,ci)][...,:] = self.velocity
8022  */
8023  }
8024 
8025  /* "ADR.pyx":522
8026  * else:
8027  * cq[('df',ci,ci)].flat[:] = 0.0
8028  * for i in range(len(cq[('r',ci)].flat)): # <<<<<<<<<<<<<<
8029  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
8030  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8031  */
8032  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 522, __pyx_L1_error)
8033  __Pyx_GOTREF(__pyx_t_2);
8034  __Pyx_INCREF(__pyx_n_s_r);
8035  __Pyx_GIVEREF(__pyx_n_s_r);
8036  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_r);
8037  __Pyx_INCREF(__pyx_v_ci);
8038  __Pyx_GIVEREF(__pyx_v_ci);
8039  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
8040  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_cq, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 522, __pyx_L1_error)
8041  __Pyx_GOTREF(__pyx_t_6);
8042  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8043  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 522, __pyx_L1_error)
8044  __Pyx_GOTREF(__pyx_t_2);
8045  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8046  __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 522, __pyx_L1_error)
8047  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8048  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 522, __pyx_L1_error)
8049  __Pyx_GOTREF(__pyx_t_2);
8050  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 522, __pyx_L1_error)
8051  __Pyx_GOTREF(__pyx_t_6);
8052  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8053  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
8054  __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
8055  __pyx_t_11 = NULL;
8056  } else {
8057  __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 522, __pyx_L1_error)
8058  __Pyx_GOTREF(__pyx_t_2);
8059  __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 522, __pyx_L1_error)
8060  }
8061  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8062  for (;;) {
8063  if (likely(!__pyx_t_11)) {
8064  if (likely(PyList_CheckExact(__pyx_t_2))) {
8065  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
8066  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8067  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(1, 522, __pyx_L1_error)
8068  #else
8069  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 522, __pyx_L1_error)
8070  __Pyx_GOTREF(__pyx_t_6);
8071  #endif
8072  } else {
8073  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
8074  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8075  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(1, 522, __pyx_L1_error)
8076  #else
8077  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 522, __pyx_L1_error)
8078  __Pyx_GOTREF(__pyx_t_6);
8079  #endif
8080  }
8081  } else {
8082  __pyx_t_6 = __pyx_t_11(__pyx_t_2);
8083  if (unlikely(!__pyx_t_6)) {
8084  PyObject* exc_type = PyErr_Occurred();
8085  if (exc_type) {
8086  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8087  else __PYX_ERR(1, 522, __pyx_L1_error)
8088  }
8089  break;
8090  }
8091  __Pyx_GOTREF(__pyx_t_6);
8092  }
8093  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
8094  __pyx_t_6 = 0;
8095 
8096  /* "ADR.pyx":523
8097  * cq[('df',ci,ci)].flat[:] = 0.0
8098  * for i in range(len(cq[('r',ci)].flat)):
8099  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
8100  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8101  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
8102  */
8103  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 523, __pyx_L1_error)
8104  __Pyx_GOTREF(__pyx_t_5);
8105  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 523, __pyx_L1_error)
8106  __Pyx_GOTREF(__pyx_t_7);
8107  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8108  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cq, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 523, __pyx_L1_error)
8109  __Pyx_GOTREF(__pyx_t_5);
8110  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flat); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 523, __pyx_L1_error)
8111  __Pyx_GOTREF(__pyx_t_12);
8112  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8113  __pyx_t_5 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 523, __pyx_L1_error)
8114  __Pyx_GOTREF(__pyx_t_5);
8115  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 523, __pyx_L1_error)
8116  __Pyx_GOTREF(__pyx_t_13);
8117  __pyx_t_14 = PyNumber_Multiply(__pyx_int_3, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 523, __pyx_L1_error)
8118  __Pyx_GOTREF(__pyx_t_14);
8119  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8120  __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_t_12, 0, 0, &__pyx_t_5, &__pyx_t_14, NULL, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 523, __pyx_L1_error)
8121  __Pyx_GOTREF(__pyx_t_13);
8122  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8123  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8124  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8125  __pyx_t_14 = NULL;
8126  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
8127  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
8128  if (likely(__pyx_t_14)) {
8129  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8130  __Pyx_INCREF(__pyx_t_14);
8131  __Pyx_INCREF(function);
8132  __Pyx_DECREF_SET(__pyx_t_7, function);
8133  }
8134  }
8135  __pyx_t_6 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_13);
8136  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
8137  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8138  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 523, __pyx_L1_error)
8139  __Pyx_GOTREF(__pyx_t_6);
8140  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8141  __pyx_t_7 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 523, __pyx_L1_error)
8142  __Pyx_GOTREF(__pyx_t_7);
8143  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8144  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 523, __pyx_L1_error)
8145  __Pyx_GOTREF(__pyx_t_6);
8146  __Pyx_INCREF(__pyx_n_s_r);
8147  __Pyx_GIVEREF(__pyx_n_s_r);
8148  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_r);
8149  __Pyx_INCREF(__pyx_v_ci);
8150  __Pyx_GIVEREF(__pyx_v_ci);
8151  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
8152  __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_v_cq, __pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 523, __pyx_L1_error)
8153  __Pyx_GOTREF(__pyx_t_13);
8154  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8155  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 523, __pyx_L1_error)
8156  __Pyx_GOTREF(__pyx_t_6);
8157  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8158  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_i, __pyx_t_7) < 0)) __PYX_ERR(1, 523, __pyx_L1_error)
8159  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8160  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8161 
8162  /* "ADR.pyx":524
8163  * for i in range(len(cq[('r',ci)].flat)):
8164  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
8165  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
8166  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
8167  * nd = self.nd
8168  */
8169  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 524, __pyx_L1_error)
8170  __Pyx_GOTREF(__pyx_t_6);
8171  __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_ci); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 524, __pyx_L1_error)
8172  __Pyx_GOTREF(__pyx_t_13);
8173  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8174  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cq, __pyx_n_s_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 524, __pyx_L1_error)
8175  __Pyx_GOTREF(__pyx_t_6);
8176  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_flat); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 524, __pyx_L1_error)
8177  __Pyx_GOTREF(__pyx_t_14);
8178  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8179  __pyx_t_6 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 524, __pyx_L1_error)
8180  __Pyx_GOTREF(__pyx_t_6);
8181  __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 524, __pyx_L1_error)
8182  __Pyx_GOTREF(__pyx_t_5);
8183  __pyx_t_12 = PyNumber_Multiply(__pyx_int_3, __pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 524, __pyx_L1_error)
8184  __Pyx_GOTREF(__pyx_t_12);
8185  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8186  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_14, 0, 0, &__pyx_t_6, &__pyx_t_12, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 524, __pyx_L1_error)
8187  __Pyx_GOTREF(__pyx_t_5);
8188  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8189  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8190  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8191  __pyx_t_12 = NULL;
8192  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
8193  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
8194  if (likely(__pyx_t_12)) {
8195  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
8196  __Pyx_INCREF(__pyx_t_12);
8197  __Pyx_INCREF(function);
8198  __Pyx_DECREF_SET(__pyx_t_13, function);
8199  }
8200  }
8201  __pyx_t_7 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_12, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_5);
8202  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
8203  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8204  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 524, __pyx_L1_error)
8205  __Pyx_GOTREF(__pyx_t_7);
8206  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8207  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 524, __pyx_L1_error)
8208  __Pyx_GOTREF(__pyx_t_13);
8209  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8210  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 524, __pyx_L1_error)
8211  __Pyx_GOTREF(__pyx_t_7);
8212  __Pyx_INCREF(__pyx_n_s_a);
8213  __Pyx_GIVEREF(__pyx_n_s_a);
8214  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_a);
8215  __Pyx_INCREF(__pyx_v_ci);
8216  __Pyx_GIVEREF(__pyx_v_ci);
8217  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8218  __Pyx_INCREF(__pyx_v_ci);
8219  __Pyx_GIVEREF(__pyx_v_ci);
8220  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
8221  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_cq, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 524, __pyx_L1_error)
8222  __Pyx_GOTREF(__pyx_t_5);
8223  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8224  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_flat); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 524, __pyx_L1_error)
8225  __Pyx_GOTREF(__pyx_t_7);
8226  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8227  __pyx_t_5 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 524, __pyx_L1_error)
8228  __Pyx_GOTREF(__pyx_t_5);
8229  __pyx_t_12 = PyNumber_Multiply(__pyx_t_5, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 524, __pyx_L1_error)
8230  __Pyx_GOTREF(__pyx_t_12);
8231  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8232  __pyx_t_5 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 524, __pyx_L1_error)
8233  __Pyx_GOTREF(__pyx_t_5);
8234  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 524, __pyx_L1_error)
8235  __Pyx_GOTREF(__pyx_t_6);
8236  __pyx_t_14 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 524, __pyx_L1_error)
8237  __Pyx_GOTREF(__pyx_t_14);
8238  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8239  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8240  if (__Pyx_PyObject_SetSlice(__pyx_t_7, __pyx_t_13, 0, 0, &__pyx_t_12, &__pyx_t_14, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 524, __pyx_L1_error)
8241  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8242  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
8243  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8244  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8245 
8246  /* "ADR.pyx":522
8247  * else:
8248  * cq[('df',ci,ci)].flat[:] = 0.0
8249  * for i in range(len(cq[('r',ci)].flat)): # <<<<<<<<<<<<<<
8250  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
8251  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8252  */
8253  }
8254  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8255 
8256  /* "ADR.pyx":516
8257  * def initializeElementQuadrature(self,t,cq):
8258  * nd = self.nd
8259  * for ci in range(self.nc): # <<<<<<<<<<<<<<
8260  * if cq.has_key(('df',ci,ci)):
8261  * if self.velocity is not None:
8262  */
8263  }
8264  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8265 
8266  /* "ADR.pyx":514
8267  * useSparseDiffusion=True,
8268  * movingDomain=False)
8269  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
8270  * nd = self.nd
8271  * for ci in range(self.nc):
8272  */
8273 
8274  /* function exit code */
8275  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8276  goto __pyx_L0;
8277  __pyx_L1_error:;
8278  __Pyx_XDECREF(__pyx_t_1);
8279  __Pyx_XDECREF(__pyx_t_2);
8280  __Pyx_XDECREF(__pyx_t_5);
8281  __Pyx_XDECREF(__pyx_t_6);
8282  __Pyx_XDECREF(__pyx_t_7);
8283  __Pyx_XDECREF(__pyx_t_12);
8284  __Pyx_XDECREF(__pyx_t_13);
8285  __Pyx_XDECREF(__pyx_t_14);
8286  __Pyx_AddTraceback("ADR.Coefficients.initializeElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
8287  __pyx_r = NULL;
8288  __pyx_L0:;
8289  __Pyx_XDECREF(__pyx_v_nd);
8290  __Pyx_XDECREF(__pyx_v_ci);
8291  __Pyx_XDECREF(__pyx_v_i);
8292  __Pyx_XGIVEREF(__pyx_r);
8293  __Pyx_RefNannyFinishContext();
8294  return __pyx_r;
8295 }
8296 
8297 /* "ADR.pyx":525
8298  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
8299  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8300  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
8301  * nd = self.nd
8302  * for c in [cebq,cebq_global]:
8303  */
8304 
8305 /* Python wrapper */
8306 static PyObject *__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8307 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_5initializeElementBoundaryQuadrature = {"initializeElementBoundaryQuadrature", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
8308 static PyObject *__pyx_pw_3ADR_12Coefficients_5initializeElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8309  PyObject *__pyx_v_self = 0;
8310  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
8311  PyObject *__pyx_v_cebq = 0;
8312  PyObject *__pyx_v_cebq_global = 0;
8313  PyObject *__pyx_r = 0;
8314  __Pyx_RefNannyDeclarations
8315  __Pyx_RefNannySetupContext("initializeElementBoundaryQuadrature (wrapper)", 0);
8316  {
8317  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cebq,&__pyx_n_s_cebq_global,0};
8318  PyObject* values[4] = {0,0,0,0};
8319  if (unlikely(__pyx_kwds)) {
8320  Py_ssize_t kw_args;
8321  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8322  switch (pos_args) {
8323  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8324  CYTHON_FALLTHROUGH;
8325  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8326  CYTHON_FALLTHROUGH;
8327  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8328  CYTHON_FALLTHROUGH;
8329  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8330  CYTHON_FALLTHROUGH;
8331  case 0: break;
8332  default: goto __pyx_L5_argtuple_error;
8333  }
8334  kw_args = PyDict_Size(__pyx_kwds);
8335  switch (pos_args) {
8336  case 0:
8337  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
8338  else goto __pyx_L5_argtuple_error;
8339  CYTHON_FALLTHROUGH;
8340  case 1:
8341  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
8342  else {
8343  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 1); __PYX_ERR(1, 525, __pyx_L3_error)
8344  }
8345  CYTHON_FALLTHROUGH;
8346  case 2:
8347  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cebq)) != 0)) kw_args--;
8348  else {
8349  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 2); __PYX_ERR(1, 525, __pyx_L3_error)
8350  }
8351  CYTHON_FALLTHROUGH;
8352  case 3:
8353  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cebq_global)) != 0)) kw_args--;
8354  else {
8355  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, 3); __PYX_ERR(1, 525, __pyx_L3_error)
8356  }
8357  }
8358  if (unlikely(kw_args > 0)) {
8359  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeElementBoundaryQuadrature") < 0)) __PYX_ERR(1, 525, __pyx_L3_error)
8360  }
8361  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
8362  goto __pyx_L5_argtuple_error;
8363  } else {
8364  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8365  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8366  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8367  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8368  }
8369  __pyx_v_self = values[0];
8370  __pyx_v_t = values[1];
8371  __pyx_v_cebq = values[2];
8372  __pyx_v_cebq_global = values[3];
8373  }
8374  goto __pyx_L4_argument_unpacking_done;
8375  __pyx_L5_argtuple_error:;
8376  __Pyx_RaiseArgtupleInvalid("initializeElementBoundaryQuadrature", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 525, __pyx_L3_error)
8377  __pyx_L3_error:;
8378  __Pyx_AddTraceback("ADR.Coefficients.initializeElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
8379  __Pyx_RefNannyFinishContext();
8380  return NULL;
8381  __pyx_L4_argument_unpacking_done:;
8382  __pyx_r = __pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cebq, __pyx_v_cebq_global);
8383 
8384  /* function exit code */
8385  __Pyx_RefNannyFinishContext();
8386  return __pyx_r;
8387 }
8388 
8389 static PyObject *__pyx_pf_3ADR_12Coefficients_4initializeElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebq, PyObject *__pyx_v_cebq_global) {
8390  PyObject *__pyx_v_nd = NULL;
8391  PyObject *__pyx_v_c = NULL;
8392  PyObject *__pyx_v_ci = NULL;
8393  PyObject *__pyx_v_i = NULL;
8394  PyObject *__pyx_r = NULL;
8395  __Pyx_RefNannyDeclarations
8396  PyObject *__pyx_t_1 = NULL;
8397  PyObject *__pyx_t_2 = NULL;
8398  Py_ssize_t __pyx_t_3;
8399  PyObject *__pyx_t_4 = NULL;
8400  Py_ssize_t __pyx_t_5;
8401  PyObject *(*__pyx_t_6)(PyObject *);
8402  PyObject *__pyx_t_7 = NULL;
8403  PyObject *__pyx_t_8 = NULL;
8404  PyObject *__pyx_t_9 = NULL;
8405  int __pyx_t_10;
8406  int __pyx_t_11;
8407  Py_ssize_t __pyx_t_12;
8408  PyObject *(*__pyx_t_13)(PyObject *);
8409  PyObject *__pyx_t_14 = NULL;
8410  PyObject *__pyx_t_15 = NULL;
8411  PyObject *__pyx_t_16 = NULL;
8412  __Pyx_RefNannySetupContext("initializeElementBoundaryQuadrature", 0);
8413 
8414  /* "ADR.pyx":526
8415  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8416  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
8417  * nd = self.nd # <<<<<<<<<<<<<<
8418  * for c in [cebq,cebq_global]:
8419  * for ci in range(self.nc):
8420  */
8421  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 526, __pyx_L1_error)
8422  __Pyx_GOTREF(__pyx_t_1);
8423  __pyx_v_nd = __pyx_t_1;
8424  __pyx_t_1 = 0;
8425 
8426  /* "ADR.pyx":527
8427  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
8428  * nd = self.nd
8429  * for c in [cebq,cebq_global]: # <<<<<<<<<<<<<<
8430  * for ci in range(self.nc):
8431  * if c.has_key(('df',ci,ci)):
8432  */
8433  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 527, __pyx_L1_error)
8434  __Pyx_GOTREF(__pyx_t_1);
8435  __Pyx_INCREF(__pyx_v_cebq);
8436  __Pyx_GIVEREF(__pyx_v_cebq);
8437  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cebq);
8438  __Pyx_INCREF(__pyx_v_cebq_global);
8439  __Pyx_GIVEREF(__pyx_v_cebq_global);
8440  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_cebq_global);
8441  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
8442  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8443  for (;;) {
8444  if (__pyx_t_3 >= 2) break;
8445  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8446  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 527, __pyx_L1_error)
8447  #else
8448  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 527, __pyx_L1_error)
8449  __Pyx_GOTREF(__pyx_t_1);
8450  #endif
8451  __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
8452  __pyx_t_1 = 0;
8453 
8454  /* "ADR.pyx":528
8455  * nd = self.nd
8456  * for c in [cebq,cebq_global]:
8457  * for ci in range(self.nc): # <<<<<<<<<<<<<<
8458  * if c.has_key(('df',ci,ci)):
8459  * if self.velocity is not None:
8460  */
8461  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 528, __pyx_L1_error)
8462  __Pyx_GOTREF(__pyx_t_1);
8463  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 528, __pyx_L1_error)
8464  __Pyx_GOTREF(__pyx_t_4);
8465  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8466  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
8467  __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
8468  __pyx_t_6 = NULL;
8469  } else {
8470  __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 528, __pyx_L1_error)
8471  __Pyx_GOTREF(__pyx_t_1);
8472  __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 528, __pyx_L1_error)
8473  }
8474  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8475  for (;;) {
8476  if (likely(!__pyx_t_6)) {
8477  if (likely(PyList_CheckExact(__pyx_t_1))) {
8478  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
8479  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8480  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 528, __pyx_L1_error)
8481  #else
8482  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 528, __pyx_L1_error)
8483  __Pyx_GOTREF(__pyx_t_4);
8484  #endif
8485  } else {
8486  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
8487  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8488  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 528, __pyx_L1_error)
8489  #else
8490  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 528, __pyx_L1_error)
8491  __Pyx_GOTREF(__pyx_t_4);
8492  #endif
8493  }
8494  } else {
8495  __pyx_t_4 = __pyx_t_6(__pyx_t_1);
8496  if (unlikely(!__pyx_t_4)) {
8497  PyObject* exc_type = PyErr_Occurred();
8498  if (exc_type) {
8499  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8500  else __PYX_ERR(1, 528, __pyx_L1_error)
8501  }
8502  break;
8503  }
8504  __Pyx_GOTREF(__pyx_t_4);
8505  }
8506  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_4);
8507  __pyx_t_4 = 0;
8508 
8509  /* "ADR.pyx":529
8510  * for c in [cebq,cebq_global]:
8511  * for ci in range(self.nc):
8512  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8513  * if self.velocity is not None:
8514  * c[('df',ci,ci)][...,:] = self.velocity
8515  */
8516  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 529, __pyx_L1_error)
8517  __Pyx_GOTREF(__pyx_t_7);
8518  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 529, __pyx_L1_error)
8519  __Pyx_GOTREF(__pyx_t_8);
8520  __Pyx_INCREF(__pyx_n_s_df);
8521  __Pyx_GIVEREF(__pyx_n_s_df);
8522  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_df);
8523  __Pyx_INCREF(__pyx_v_ci);
8524  __Pyx_GIVEREF(__pyx_v_ci);
8525  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
8526  __Pyx_INCREF(__pyx_v_ci);
8527  __Pyx_GIVEREF(__pyx_v_ci);
8528  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ci);
8529  __pyx_t_9 = NULL;
8530  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
8531  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
8532  if (likely(__pyx_t_9)) {
8533  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
8534  __Pyx_INCREF(__pyx_t_9);
8535  __Pyx_INCREF(function);
8536  __Pyx_DECREF_SET(__pyx_t_7, function);
8537  }
8538  }
8539  __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
8540  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8541  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8542  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 529, __pyx_L1_error)
8543  __Pyx_GOTREF(__pyx_t_4);
8544  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8545  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 529, __pyx_L1_error)
8546  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8547  if (__pyx_t_10) {
8548 
8549  /* "ADR.pyx":530
8550  * for ci in range(self.nc):
8551  * if c.has_key(('df',ci,ci)):
8552  * if self.velocity is not None: # <<<<<<<<<<<<<<
8553  * c[('df',ci,ci)][...,:] = self.velocity
8554  * else:
8555  */
8556  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 530, __pyx_L1_error)
8557  __Pyx_GOTREF(__pyx_t_4);
8558  __pyx_t_10 = (__pyx_t_4 != Py_None);
8559  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8560  __pyx_t_11 = (__pyx_t_10 != 0);
8561  if (__pyx_t_11) {
8562 
8563  /* "ADR.pyx":531
8564  * if c.has_key(('df',ci,ci)):
8565  * if self.velocity is not None:
8566  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
8567  * else:
8568  * c[('df',ci,ci)].flat[:] = 0.0
8569  */
8570  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 531, __pyx_L1_error)
8571  __Pyx_GOTREF(__pyx_t_4);
8572  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 531, __pyx_L1_error)
8573  __Pyx_GOTREF(__pyx_t_7);
8574  __Pyx_INCREF(__pyx_n_s_df);
8575  __Pyx_GIVEREF(__pyx_n_s_df);
8576  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
8577  __Pyx_INCREF(__pyx_v_ci);
8578  __Pyx_GIVEREF(__pyx_v_ci);
8579  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8580  __Pyx_INCREF(__pyx_v_ci);
8581  __Pyx_GIVEREF(__pyx_v_ci);
8582  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
8583  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 531, __pyx_L1_error)
8584  __Pyx_GOTREF(__pyx_t_8);
8585  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8586  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__5, __pyx_t_4) < 0)) __PYX_ERR(1, 531, __pyx_L1_error)
8587  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8588  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8589 
8590  /* "ADR.pyx":530
8591  * for ci in range(self.nc):
8592  * if c.has_key(('df',ci,ci)):
8593  * if self.velocity is not None: # <<<<<<<<<<<<<<
8594  * c[('df',ci,ci)][...,:] = self.velocity
8595  * else:
8596  */
8597  goto __pyx_L8;
8598  }
8599 
8600  /* "ADR.pyx":533
8601  * c[('df',ci,ci)][...,:] = self.velocity
8602  * else:
8603  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
8604  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8605  * for i in range(len(c[('u',ci)].flat)):
8606  */
8607  /*else*/ {
8608  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 533, __pyx_L1_error)
8609  __Pyx_GOTREF(__pyx_t_4);
8610  __Pyx_INCREF(__pyx_n_s_df);
8611  __Pyx_GIVEREF(__pyx_n_s_df);
8612  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_df);
8613  __Pyx_INCREF(__pyx_v_ci);
8614  __Pyx_GIVEREF(__pyx_v_ci);
8615  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ci);
8616  __Pyx_INCREF(__pyx_v_ci);
8617  __Pyx_GIVEREF(__pyx_v_ci);
8618  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_ci);
8619  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 533, __pyx_L1_error)
8620  __Pyx_GOTREF(__pyx_t_8);
8621  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8622  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 533, __pyx_L1_error)
8623  __Pyx_GOTREF(__pyx_t_4);
8624  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8625  if (__Pyx_PyObject_SetSlice(__pyx_t_4, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__3, 0, 0, 1) < 0) __PYX_ERR(1, 533, __pyx_L1_error)
8626  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8627  }
8628  __pyx_L8:;
8629 
8630  /* "ADR.pyx":529
8631  * for c in [cebq,cebq_global]:
8632  * for ci in range(self.nc):
8633  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
8634  * if self.velocity is not None:
8635  * c[('df',ci,ci)][...,:] = self.velocity
8636  */
8637  }
8638 
8639  /* "ADR.pyx":534
8640  * else:
8641  * c[('df',ci,ci)].flat[:] = 0.0
8642  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
8643  * for i in range(len(c[('u',ci)].flat)):
8644  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8645  */
8646  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 534, __pyx_L1_error)
8647  __Pyx_GOTREF(__pyx_t_8);
8648  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 534, __pyx_L1_error)
8649  __Pyx_GOTREF(__pyx_t_7);
8650  __Pyx_INCREF(__pyx_n_s_r);
8651  __Pyx_GIVEREF(__pyx_n_s_r);
8652  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_r);
8653  __Pyx_INCREF(__pyx_v_ci);
8654  __Pyx_GIVEREF(__pyx_v_ci);
8655  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8656  __pyx_t_9 = NULL;
8657  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
8658  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
8659  if (likely(__pyx_t_9)) {
8660  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
8661  __Pyx_INCREF(__pyx_t_9);
8662  __Pyx_INCREF(function);
8663  __Pyx_DECREF_SET(__pyx_t_8, function);
8664  }
8665  }
8666  __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
8667  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8668  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8669  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 534, __pyx_L1_error)
8670  __Pyx_GOTREF(__pyx_t_4);
8671  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8672  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 534, __pyx_L1_error)
8673  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8674  if (__pyx_t_10) {
8675  } else {
8676  __pyx_t_11 = __pyx_t_10;
8677  goto __pyx_L10_bool_binop_done;
8678  }
8679  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 534, __pyx_L1_error)
8680  __Pyx_GOTREF(__pyx_t_8);
8681  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 534, __pyx_L1_error)
8682  __Pyx_GOTREF(__pyx_t_7);
8683  __Pyx_INCREF(__pyx_n_s_a);
8684  __Pyx_GIVEREF(__pyx_n_s_a);
8685  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_a);
8686  __Pyx_INCREF(__pyx_v_ci);
8687  __Pyx_GIVEREF(__pyx_v_ci);
8688  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
8689  __Pyx_INCREF(__pyx_v_ci);
8690  __Pyx_GIVEREF(__pyx_v_ci);
8691  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
8692  __pyx_t_9 = NULL;
8693  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
8694  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
8695  if (likely(__pyx_t_9)) {
8696  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
8697  __Pyx_INCREF(__pyx_t_9);
8698  __Pyx_INCREF(function);
8699  __Pyx_DECREF_SET(__pyx_t_8, function);
8700  }
8701  }
8702  __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
8703  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
8704  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8705  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 534, __pyx_L1_error)
8706  __Pyx_GOTREF(__pyx_t_4);
8707  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8708  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 534, __pyx_L1_error)
8709  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8710  __pyx_t_11 = __pyx_t_10;
8711  __pyx_L10_bool_binop_done:;
8712  if (__pyx_t_11) {
8713 
8714  /* "ADR.pyx":535
8715  * c[('df',ci,ci)].flat[:] = 0.0
8716  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8717  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
8718  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8719  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8720  */
8721  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 535, __pyx_L1_error)
8722  __Pyx_GOTREF(__pyx_t_4);
8723  __Pyx_INCREF(__pyx_n_s_u);
8724  __Pyx_GIVEREF(__pyx_n_s_u);
8725  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_u);
8726  __Pyx_INCREF(__pyx_v_ci);
8727  __Pyx_GIVEREF(__pyx_v_ci);
8728  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ci);
8729  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 535, __pyx_L1_error)
8730  __Pyx_GOTREF(__pyx_t_8);
8731  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8732  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 535, __pyx_L1_error)
8733  __Pyx_GOTREF(__pyx_t_4);
8734  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8735  __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 535, __pyx_L1_error)
8736  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8737  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 535, __pyx_L1_error)
8738  __Pyx_GOTREF(__pyx_t_4);
8739  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 535, __pyx_L1_error)
8740  __Pyx_GOTREF(__pyx_t_8);
8741  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8742  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
8743  __pyx_t_4 = __pyx_t_8; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0;
8744  __pyx_t_13 = NULL;
8745  } else {
8746  __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 535, __pyx_L1_error)
8747  __Pyx_GOTREF(__pyx_t_4);
8748  __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 535, __pyx_L1_error)
8749  }
8750  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8751  for (;;) {
8752  if (likely(!__pyx_t_13)) {
8753  if (likely(PyList_CheckExact(__pyx_t_4))) {
8754  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
8755  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8756  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 535, __pyx_L1_error)
8757  #else
8758  __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 535, __pyx_L1_error)
8759  __Pyx_GOTREF(__pyx_t_8);
8760  #endif
8761  } else {
8762  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
8763  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8764  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 535, __pyx_L1_error)
8765  #else
8766  __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 535, __pyx_L1_error)
8767  __Pyx_GOTREF(__pyx_t_8);
8768  #endif
8769  }
8770  } else {
8771  __pyx_t_8 = __pyx_t_13(__pyx_t_4);
8772  if (unlikely(!__pyx_t_8)) {
8773  PyObject* exc_type = PyErr_Occurred();
8774  if (exc_type) {
8775  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8776  else __PYX_ERR(1, 535, __pyx_L1_error)
8777  }
8778  break;
8779  }
8780  __Pyx_GOTREF(__pyx_t_8);
8781  }
8782  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
8783  __pyx_t_8 = 0;
8784 
8785  /* "ADR.pyx":536
8786  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8787  * for i in range(len(c[('u',ci)].flat)):
8788  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
8789  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8790  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8791  */
8792  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 536, __pyx_L1_error)
8793  __Pyx_GOTREF(__pyx_t_7);
8794  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 536, __pyx_L1_error)
8795  __Pyx_GOTREF(__pyx_t_9);
8796  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8797  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 536, __pyx_L1_error)
8798  __Pyx_GOTREF(__pyx_t_7);
8799  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 536, __pyx_L1_error)
8800  __Pyx_GOTREF(__pyx_t_14);
8801  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8802  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 536, __pyx_L1_error)
8803  __Pyx_GOTREF(__pyx_t_7);
8804  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 536, __pyx_L1_error)
8805  __Pyx_GOTREF(__pyx_t_15);
8806  __pyx_t_16 = PyNumber_Multiply(__pyx_int_3, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 536, __pyx_L1_error)
8807  __Pyx_GOTREF(__pyx_t_16);
8808  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8809  __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_14, 0, 0, &__pyx_t_7, &__pyx_t_16, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 536, __pyx_L1_error)
8810  __Pyx_GOTREF(__pyx_t_15);
8811  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8812  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8813  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8814  __pyx_t_16 = NULL;
8815  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
8816  __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
8817  if (likely(__pyx_t_16)) {
8818  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
8819  __Pyx_INCREF(__pyx_t_16);
8820  __Pyx_INCREF(function);
8821  __Pyx_DECREF_SET(__pyx_t_9, function);
8822  }
8823  }
8824  __pyx_t_8 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_16, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15);
8825  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
8826  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8827  if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 536, __pyx_L1_error)
8828  __Pyx_GOTREF(__pyx_t_8);
8829  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8830  __pyx_t_9 = PyNumber_Negative(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 536, __pyx_L1_error)
8831  __Pyx_GOTREF(__pyx_t_9);
8832  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8833  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 536, __pyx_L1_error)
8834  __Pyx_GOTREF(__pyx_t_8);
8835  __Pyx_INCREF(__pyx_n_s_r);
8836  __Pyx_GIVEREF(__pyx_n_s_r);
8837  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_r);
8838  __Pyx_INCREF(__pyx_v_ci);
8839  __Pyx_GIVEREF(__pyx_v_ci);
8840  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
8841  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 536, __pyx_L1_error)
8842  __Pyx_GOTREF(__pyx_t_15);
8843  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8844  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 536, __pyx_L1_error)
8845  __Pyx_GOTREF(__pyx_t_8);
8846  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8847  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(1, 536, __pyx_L1_error)
8848  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8849  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8850 
8851  /* "ADR.pyx":537
8852  * for i in range(len(c[('u',ci)].flat)):
8853  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8854  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
8855  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
8856  * nd = self.nd
8857  */
8858  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 537, __pyx_L1_error)
8859  __Pyx_GOTREF(__pyx_t_8);
8860  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 537, __pyx_L1_error)
8861  __Pyx_GOTREF(__pyx_t_15);
8862  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8863  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 537, __pyx_L1_error)
8864  __Pyx_GOTREF(__pyx_t_8);
8865  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 537, __pyx_L1_error)
8866  __Pyx_GOTREF(__pyx_t_16);
8867  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8868  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 537, __pyx_L1_error)
8869  __Pyx_GOTREF(__pyx_t_8);
8870  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 537, __pyx_L1_error)
8871  __Pyx_GOTREF(__pyx_t_7);
8872  __pyx_t_14 = PyNumber_Multiply(__pyx_int_3, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 537, __pyx_L1_error)
8873  __Pyx_GOTREF(__pyx_t_14);
8874  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8875  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_16, 0, 0, &__pyx_t_8, &__pyx_t_14, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 537, __pyx_L1_error)
8876  __Pyx_GOTREF(__pyx_t_7);
8877  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8878  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8879  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8880  __pyx_t_14 = NULL;
8881  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
8882  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
8883  if (likely(__pyx_t_14)) {
8884  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
8885  __Pyx_INCREF(__pyx_t_14);
8886  __Pyx_INCREF(function);
8887  __Pyx_DECREF_SET(__pyx_t_15, function);
8888  }
8889  }
8890  __pyx_t_9 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_14, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_7);
8891  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
8892  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8893  if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 537, __pyx_L1_error)
8894  __Pyx_GOTREF(__pyx_t_9);
8895  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8896  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_flat); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 537, __pyx_L1_error)
8897  __Pyx_GOTREF(__pyx_t_15);
8898  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8899  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 537, __pyx_L1_error)
8900  __Pyx_GOTREF(__pyx_t_9);
8901  __Pyx_INCREF(__pyx_n_s_a);
8902  __Pyx_GIVEREF(__pyx_n_s_a);
8903  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
8904  __Pyx_INCREF(__pyx_v_ci);
8905  __Pyx_GIVEREF(__pyx_v_ci);
8906  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
8907  __Pyx_INCREF(__pyx_v_ci);
8908  __Pyx_GIVEREF(__pyx_v_ci);
8909  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
8910  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 537, __pyx_L1_error)
8911  __Pyx_GOTREF(__pyx_t_7);
8912  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8913  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 537, __pyx_L1_error)
8914  __Pyx_GOTREF(__pyx_t_9);
8915  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8916  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 537, __pyx_L1_error)
8917  __Pyx_GOTREF(__pyx_t_7);
8918  __pyx_t_14 = PyNumber_Multiply(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 537, __pyx_L1_error)
8919  __Pyx_GOTREF(__pyx_t_14);
8920  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8921  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 537, __pyx_L1_error)
8922  __Pyx_GOTREF(__pyx_t_7);
8923  __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 537, __pyx_L1_error)
8924  __Pyx_GOTREF(__pyx_t_8);
8925  __pyx_t_16 = PyNumber_Multiply(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 537, __pyx_L1_error)
8926  __Pyx_GOTREF(__pyx_t_16);
8927  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8928  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8929  if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_15, 0, 0, &__pyx_t_14, &__pyx_t_16, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 537, __pyx_L1_error)
8930  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8931  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8932  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
8933  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8934 
8935  /* "ADR.pyx":535
8936  * c[('df',ci,ci)].flat[:] = 0.0
8937  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
8938  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
8939  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8940  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
8941  */
8942  }
8943  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8944 
8945  /* "ADR.pyx":534
8946  * else:
8947  * c[('df',ci,ci)].flat[:] = 0.0
8948  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
8949  * for i in range(len(c[('u',ci)].flat)):
8950  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
8951  */
8952  }
8953 
8954  /* "ADR.pyx":528
8955  * nd = self.nd
8956  * for c in [cebq,cebq_global]:
8957  * for ci in range(self.nc): # <<<<<<<<<<<<<<
8958  * if c.has_key(('df',ci,ci)):
8959  * if self.velocity is not None:
8960  */
8961  }
8962  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8963 
8964  /* "ADR.pyx":527
8965  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global):
8966  * nd = self.nd
8967  * for c in [cebq,cebq_global]: # <<<<<<<<<<<<<<
8968  * for ci in range(self.nc):
8969  * if c.has_key(('df',ci,ci)):
8970  */
8971  }
8972  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8973 
8974  /* "ADR.pyx":525
8975  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
8976  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
8977  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
8978  * nd = self.nd
8979  * for c in [cebq,cebq_global]:
8980  */
8981 
8982  /* function exit code */
8983  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8984  goto __pyx_L0;
8985  __pyx_L1_error:;
8986  __Pyx_XDECREF(__pyx_t_1);
8987  __Pyx_XDECREF(__pyx_t_2);
8988  __Pyx_XDECREF(__pyx_t_4);
8989  __Pyx_XDECREF(__pyx_t_7);
8990  __Pyx_XDECREF(__pyx_t_8);
8991  __Pyx_XDECREF(__pyx_t_9);
8992  __Pyx_XDECREF(__pyx_t_14);
8993  __Pyx_XDECREF(__pyx_t_15);
8994  __Pyx_XDECREF(__pyx_t_16);
8995  __Pyx_AddTraceback("ADR.Coefficients.initializeElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
8996  __pyx_r = NULL;
8997  __pyx_L0:;
8998  __Pyx_XDECREF(__pyx_v_nd);
8999  __Pyx_XDECREF(__pyx_v_c);
9000  __Pyx_XDECREF(__pyx_v_ci);
9001  __Pyx_XDECREF(__pyx_v_i);
9002  __Pyx_XGIVEREF(__pyx_r);
9003  __Pyx_RefNannyFinishContext();
9004  return __pyx_r;
9005 }
9006 
9007 /* "ADR.pyx":538
9008  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9009  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9010  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
9011  * nd = self.nd
9012  * for c in [cebqe]:
9013  */
9014 
9015 /* Python wrapper */
9016 static PyObject *__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9017 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature = {"initializeGlobalExteriorElementBoundaryQuadrature", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature, METH_VARARGS|METH_KEYWORDS, 0};
9018 static PyObject *__pyx_pw_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9019  PyObject *__pyx_v_self = 0;
9020  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
9021  PyObject *__pyx_v_cebqe = 0;
9022  PyObject *__pyx_r = 0;
9023  __Pyx_RefNannyDeclarations
9024  __Pyx_RefNannySetupContext("initializeGlobalExteriorElementBoundaryQuadrature (wrapper)", 0);
9025  {
9026  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_cebqe,0};
9027  PyObject* values[3] = {0,0,0};
9028  if (unlikely(__pyx_kwds)) {
9029  Py_ssize_t kw_args;
9030  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9031  switch (pos_args) {
9032  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9033  CYTHON_FALLTHROUGH;
9034  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9035  CYTHON_FALLTHROUGH;
9036  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9037  CYTHON_FALLTHROUGH;
9038  case 0: break;
9039  default: goto __pyx_L5_argtuple_error;
9040  }
9041  kw_args = PyDict_Size(__pyx_kwds);
9042  switch (pos_args) {
9043  case 0:
9044  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
9045  else goto __pyx_L5_argtuple_error;
9046  CYTHON_FALLTHROUGH;
9047  case 1:
9048  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9049  else {
9050  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, 1); __PYX_ERR(1, 538, __pyx_L3_error)
9051  }
9052  CYTHON_FALLTHROUGH;
9053  case 2:
9054  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cebqe)) != 0)) kw_args--;
9055  else {
9056  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, 2); __PYX_ERR(1, 538, __pyx_L3_error)
9057  }
9058  }
9059  if (unlikely(kw_args > 0)) {
9060  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initializeGlobalExteriorElementBoundaryQuadrature") < 0)) __PYX_ERR(1, 538, __pyx_L3_error)
9061  }
9062  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9063  goto __pyx_L5_argtuple_error;
9064  } else {
9065  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9066  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9067  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9068  }
9069  __pyx_v_self = values[0];
9070  __pyx_v_t = values[1];
9071  __pyx_v_cebqe = values[2];
9072  }
9073  goto __pyx_L4_argument_unpacking_done;
9074  __pyx_L5_argtuple_error:;
9075  __Pyx_RaiseArgtupleInvalid("initializeGlobalExteriorElementBoundaryQuadrature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 538, __pyx_L3_error)
9076  __pyx_L3_error:;
9077  __Pyx_AddTraceback("ADR.Coefficients.initializeGlobalExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
9078  __Pyx_RefNannyFinishContext();
9079  return NULL;
9080  __pyx_L4_argument_unpacking_done:;
9081  __pyx_r = __pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_cebqe);
9082 
9083  /* function exit code */
9084  __Pyx_RefNannyFinishContext();
9085  return __pyx_r;
9086 }
9087 
9088 static PyObject *__pyx_pf_3ADR_12Coefficients_6initializeGlobalExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_cebqe) {
9089  PyObject *__pyx_v_nd = NULL;
9090  PyObject *__pyx_v_c = NULL;
9091  PyObject *__pyx_v_ci = NULL;
9092  PyObject *__pyx_v_i = NULL;
9093  PyObject *__pyx_r = NULL;
9094  __Pyx_RefNannyDeclarations
9095  PyObject *__pyx_t_1 = NULL;
9096  PyObject *__pyx_t_2 = NULL;
9097  Py_ssize_t __pyx_t_3;
9098  PyObject *__pyx_t_4 = NULL;
9099  Py_ssize_t __pyx_t_5;
9100  PyObject *(*__pyx_t_6)(PyObject *);
9101  PyObject *__pyx_t_7 = NULL;
9102  PyObject *__pyx_t_8 = NULL;
9103  PyObject *__pyx_t_9 = NULL;
9104  int __pyx_t_10;
9105  int __pyx_t_11;
9106  Py_ssize_t __pyx_t_12;
9107  PyObject *(*__pyx_t_13)(PyObject *);
9108  PyObject *__pyx_t_14 = NULL;
9109  PyObject *__pyx_t_15 = NULL;
9110  PyObject *__pyx_t_16 = NULL;
9111  __Pyx_RefNannySetupContext("initializeGlobalExteriorElementBoundaryQuadrature", 0);
9112 
9113  /* "ADR.pyx":539
9114  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9115  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
9116  * nd = self.nd # <<<<<<<<<<<<<<
9117  * for c in [cebqe]:
9118  * for ci in range(self.nc):
9119  */
9120  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error)
9121  __Pyx_GOTREF(__pyx_t_1);
9122  __pyx_v_nd = __pyx_t_1;
9123  __pyx_t_1 = 0;
9124 
9125  /* "ADR.pyx":540
9126  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
9127  * nd = self.nd
9128  * for c in [cebqe]: # <<<<<<<<<<<<<<
9129  * for ci in range(self.nc):
9130  * if c.has_key(('df',ci,ci)):
9131  */
9132  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 540, __pyx_L1_error)
9133  __Pyx_GOTREF(__pyx_t_1);
9134  __Pyx_INCREF(__pyx_v_cebqe);
9135  __Pyx_GIVEREF(__pyx_v_cebqe);
9136  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cebqe);
9137  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
9138  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9139  for (;;) {
9140  if (__pyx_t_3 >= 1) break;
9141  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9142  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 540, __pyx_L1_error)
9143  #else
9144  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 540, __pyx_L1_error)
9145  __Pyx_GOTREF(__pyx_t_1);
9146  #endif
9147  __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
9148  __pyx_t_1 = 0;
9149 
9150  /* "ADR.pyx":541
9151  * nd = self.nd
9152  * for c in [cebqe]:
9153  * for ci in range(self.nc): # <<<<<<<<<<<<<<
9154  * if c.has_key(('df',ci,ci)):
9155  * if self.velocity is not None:
9156  */
9157  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error)
9158  __Pyx_GOTREF(__pyx_t_1);
9159  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 541, __pyx_L1_error)
9160  __Pyx_GOTREF(__pyx_t_4);
9161  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9162  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
9163  __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
9164  __pyx_t_6 = NULL;
9165  } else {
9166  __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error)
9167  __Pyx_GOTREF(__pyx_t_1);
9168  __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 541, __pyx_L1_error)
9169  }
9170  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9171  for (;;) {
9172  if (likely(!__pyx_t_6)) {
9173  if (likely(PyList_CheckExact(__pyx_t_1))) {
9174  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
9175  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9176  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 541, __pyx_L1_error)
9177  #else
9178  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 541, __pyx_L1_error)
9179  __Pyx_GOTREF(__pyx_t_4);
9180  #endif
9181  } else {
9182  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
9183  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9184  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 541, __pyx_L1_error)
9185  #else
9186  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 541, __pyx_L1_error)
9187  __Pyx_GOTREF(__pyx_t_4);
9188  #endif
9189  }
9190  } else {
9191  __pyx_t_4 = __pyx_t_6(__pyx_t_1);
9192  if (unlikely(!__pyx_t_4)) {
9193  PyObject* exc_type = PyErr_Occurred();
9194  if (exc_type) {
9195  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9196  else __PYX_ERR(1, 541, __pyx_L1_error)
9197  }
9198  break;
9199  }
9200  __Pyx_GOTREF(__pyx_t_4);
9201  }
9202  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_4);
9203  __pyx_t_4 = 0;
9204 
9205  /* "ADR.pyx":542
9206  * for c in [cebqe]:
9207  * for ci in range(self.nc):
9208  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
9209  * if self.velocity is not None:
9210  * c[('df',ci,ci)][...,:] = self.velocity
9211  */
9212  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 542, __pyx_L1_error)
9213  __Pyx_GOTREF(__pyx_t_7);
9214  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 542, __pyx_L1_error)
9215  __Pyx_GOTREF(__pyx_t_8);
9216  __Pyx_INCREF(__pyx_n_s_df);
9217  __Pyx_GIVEREF(__pyx_n_s_df);
9218  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_df);
9219  __Pyx_INCREF(__pyx_v_ci);
9220  __Pyx_GIVEREF(__pyx_v_ci);
9221  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
9222  __Pyx_INCREF(__pyx_v_ci);
9223  __Pyx_GIVEREF(__pyx_v_ci);
9224  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ci);
9225  __pyx_t_9 = NULL;
9226  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
9227  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
9228  if (likely(__pyx_t_9)) {
9229  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
9230  __Pyx_INCREF(__pyx_t_9);
9231  __Pyx_INCREF(function);
9232  __Pyx_DECREF_SET(__pyx_t_7, function);
9233  }
9234  }
9235  __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
9236  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9237  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9238  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 542, __pyx_L1_error)
9239  __Pyx_GOTREF(__pyx_t_4);
9240  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9241  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 542, __pyx_L1_error)
9242  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9243  if (__pyx_t_10) {
9244 
9245  /* "ADR.pyx":543
9246  * for ci in range(self.nc):
9247  * if c.has_key(('df',ci,ci)):
9248  * if self.velocity is not None: # <<<<<<<<<<<<<<
9249  * c[('df',ci,ci)][...,:] = self.velocity
9250  * else:
9251  */
9252  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 543, __pyx_L1_error)
9253  __Pyx_GOTREF(__pyx_t_4);
9254  __pyx_t_10 = (__pyx_t_4 != Py_None);
9255  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9256  __pyx_t_11 = (__pyx_t_10 != 0);
9257  if (__pyx_t_11) {
9258 
9259  /* "ADR.pyx":544
9260  * if c.has_key(('df',ci,ci)):
9261  * if self.velocity is not None:
9262  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
9263  * else:
9264  * c[('df',ci,ci)].flat[:] = 0.0
9265  */
9266  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 544, __pyx_L1_error)
9267  __Pyx_GOTREF(__pyx_t_4);
9268  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 544, __pyx_L1_error)
9269  __Pyx_GOTREF(__pyx_t_7);
9270  __Pyx_INCREF(__pyx_n_s_df);
9271  __Pyx_GIVEREF(__pyx_n_s_df);
9272  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
9273  __Pyx_INCREF(__pyx_v_ci);
9274  __Pyx_GIVEREF(__pyx_v_ci);
9275  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9276  __Pyx_INCREF(__pyx_v_ci);
9277  __Pyx_GIVEREF(__pyx_v_ci);
9278  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
9279  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 544, __pyx_L1_error)
9280  __Pyx_GOTREF(__pyx_t_8);
9281  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9282  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__5, __pyx_t_4) < 0)) __PYX_ERR(1, 544, __pyx_L1_error)
9283  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9284  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9285 
9286  /* "ADR.pyx":543
9287  * for ci in range(self.nc):
9288  * if c.has_key(('df',ci,ci)):
9289  * if self.velocity is not None: # <<<<<<<<<<<<<<
9290  * c[('df',ci,ci)][...,:] = self.velocity
9291  * else:
9292  */
9293  goto __pyx_L8;
9294  }
9295 
9296  /* "ADR.pyx":546
9297  * c[('df',ci,ci)][...,:] = self.velocity
9298  * else:
9299  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
9300  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9301  * for i in range(len(c[('u',ci)].flat)):
9302  */
9303  /*else*/ {
9304  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 546, __pyx_L1_error)
9305  __Pyx_GOTREF(__pyx_t_4);
9306  __Pyx_INCREF(__pyx_n_s_df);
9307  __Pyx_GIVEREF(__pyx_n_s_df);
9308  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_df);
9309  __Pyx_INCREF(__pyx_v_ci);
9310  __Pyx_GIVEREF(__pyx_v_ci);
9311  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ci);
9312  __Pyx_INCREF(__pyx_v_ci);
9313  __Pyx_GIVEREF(__pyx_v_ci);
9314  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_ci);
9315  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 546, __pyx_L1_error)
9316  __Pyx_GOTREF(__pyx_t_8);
9317  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9318  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 546, __pyx_L1_error)
9319  __Pyx_GOTREF(__pyx_t_4);
9320  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9321  if (__Pyx_PyObject_SetSlice(__pyx_t_4, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__3, 0, 0, 1) < 0) __PYX_ERR(1, 546, __pyx_L1_error)
9322  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9323  }
9324  __pyx_L8:;
9325 
9326  /* "ADR.pyx":542
9327  * for c in [cebqe]:
9328  * for ci in range(self.nc):
9329  * if c.has_key(('df',ci,ci)): # <<<<<<<<<<<<<<
9330  * if self.velocity is not None:
9331  * c[('df',ci,ci)][...,:] = self.velocity
9332  */
9333  }
9334 
9335  /* "ADR.pyx":547
9336  * else:
9337  * c[('df',ci,ci)].flat[:] = 0.0
9338  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
9339  * for i in range(len(c[('u',ci)].flat)):
9340  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9341  */
9342  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 547, __pyx_L1_error)
9343  __Pyx_GOTREF(__pyx_t_8);
9344  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 547, __pyx_L1_error)
9345  __Pyx_GOTREF(__pyx_t_7);
9346  __Pyx_INCREF(__pyx_n_s_r);
9347  __Pyx_GIVEREF(__pyx_n_s_r);
9348  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_r);
9349  __Pyx_INCREF(__pyx_v_ci);
9350  __Pyx_GIVEREF(__pyx_v_ci);
9351  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9352  __pyx_t_9 = NULL;
9353  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
9354  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
9355  if (likely(__pyx_t_9)) {
9356  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
9357  __Pyx_INCREF(__pyx_t_9);
9358  __Pyx_INCREF(function);
9359  __Pyx_DECREF_SET(__pyx_t_8, function);
9360  }
9361  }
9362  __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
9363  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9364  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9365  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L1_error)
9366  __Pyx_GOTREF(__pyx_t_4);
9367  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9368  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 547, __pyx_L1_error)
9369  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9370  if (__pyx_t_10) {
9371  } else {
9372  __pyx_t_11 = __pyx_t_10;
9373  goto __pyx_L10_bool_binop_done;
9374  }
9375  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_has_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 547, __pyx_L1_error)
9376  __Pyx_GOTREF(__pyx_t_8);
9377  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 547, __pyx_L1_error)
9378  __Pyx_GOTREF(__pyx_t_7);
9379  __Pyx_INCREF(__pyx_n_s_a);
9380  __Pyx_GIVEREF(__pyx_n_s_a);
9381  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_a);
9382  __Pyx_INCREF(__pyx_v_ci);
9383  __Pyx_GIVEREF(__pyx_v_ci);
9384  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9385  __Pyx_INCREF(__pyx_v_ci);
9386  __Pyx_GIVEREF(__pyx_v_ci);
9387  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
9388  __pyx_t_9 = NULL;
9389  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
9390  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
9391  if (likely(__pyx_t_9)) {
9392  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
9393  __Pyx_INCREF(__pyx_t_9);
9394  __Pyx_INCREF(function);
9395  __Pyx_DECREF_SET(__pyx_t_8, function);
9396  }
9397  }
9398  __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
9399  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9400  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9401  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L1_error)
9402  __Pyx_GOTREF(__pyx_t_4);
9403  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9404  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(1, 547, __pyx_L1_error)
9405  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9406  __pyx_t_11 = __pyx_t_10;
9407  __pyx_L10_bool_binop_done:;
9408  if (__pyx_t_11) {
9409 
9410  /* "ADR.pyx":548
9411  * c[('df',ci,ci)].flat[:] = 0.0
9412  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9413  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
9414  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9415  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9416  */
9417  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 548, __pyx_L1_error)
9418  __Pyx_GOTREF(__pyx_t_4);
9419  __Pyx_INCREF(__pyx_n_s_u);
9420  __Pyx_GIVEREF(__pyx_n_s_u);
9421  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_u);
9422  __Pyx_INCREF(__pyx_v_ci);
9423  __Pyx_GIVEREF(__pyx_v_ci);
9424  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ci);
9425  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 548, __pyx_L1_error)
9426  __Pyx_GOTREF(__pyx_t_8);
9427  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9428  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 548, __pyx_L1_error)
9429  __Pyx_GOTREF(__pyx_t_4);
9430  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9431  __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(1, 548, __pyx_L1_error)
9432  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9433  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 548, __pyx_L1_error)
9434  __Pyx_GOTREF(__pyx_t_4);
9435  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 548, __pyx_L1_error)
9436  __Pyx_GOTREF(__pyx_t_8);
9437  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9438  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
9439  __pyx_t_4 = __pyx_t_8; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0;
9440  __pyx_t_13 = NULL;
9441  } else {
9442  __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 548, __pyx_L1_error)
9443  __Pyx_GOTREF(__pyx_t_4);
9444  __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 548, __pyx_L1_error)
9445  }
9446  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9447  for (;;) {
9448  if (likely(!__pyx_t_13)) {
9449  if (likely(PyList_CheckExact(__pyx_t_4))) {
9450  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
9451  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9452  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 548, __pyx_L1_error)
9453  #else
9454  __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 548, __pyx_L1_error)
9455  __Pyx_GOTREF(__pyx_t_8);
9456  #endif
9457  } else {
9458  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
9459  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9460  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 548, __pyx_L1_error)
9461  #else
9462  __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 548, __pyx_L1_error)
9463  __Pyx_GOTREF(__pyx_t_8);
9464  #endif
9465  }
9466  } else {
9467  __pyx_t_8 = __pyx_t_13(__pyx_t_4);
9468  if (unlikely(!__pyx_t_8)) {
9469  PyObject* exc_type = PyErr_Occurred();
9470  if (exc_type) {
9471  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9472  else __PYX_ERR(1, 548, __pyx_L1_error)
9473  }
9474  break;
9475  }
9476  __Pyx_GOTREF(__pyx_t_8);
9477  }
9478  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
9479  __pyx_t_8 = 0;
9480 
9481  /* "ADR.pyx":549
9482  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9483  * for i in range(len(c[('u',ci)].flat)):
9484  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
9485  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9486  * def evaluate(self,t,c):
9487  */
9488  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 549, __pyx_L1_error)
9489  __Pyx_GOTREF(__pyx_t_7);
9490  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 549, __pyx_L1_error)
9491  __Pyx_GOTREF(__pyx_t_9);
9492  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9493  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 549, __pyx_L1_error)
9494  __Pyx_GOTREF(__pyx_t_7);
9495  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 549, __pyx_L1_error)
9496  __Pyx_GOTREF(__pyx_t_14);
9497  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9498  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 549, __pyx_L1_error)
9499  __Pyx_GOTREF(__pyx_t_7);
9500  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 549, __pyx_L1_error)
9501  __Pyx_GOTREF(__pyx_t_15);
9502  __pyx_t_16 = PyNumber_Multiply(__pyx_int_3, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 549, __pyx_L1_error)
9503  __Pyx_GOTREF(__pyx_t_16);
9504  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9505  __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_t_14, 0, 0, &__pyx_t_7, &__pyx_t_16, NULL, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 549, __pyx_L1_error)
9506  __Pyx_GOTREF(__pyx_t_15);
9507  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9508  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9509  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9510  __pyx_t_16 = NULL;
9511  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
9512  __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
9513  if (likely(__pyx_t_16)) {
9514  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
9515  __Pyx_INCREF(__pyx_t_16);
9516  __Pyx_INCREF(function);
9517  __Pyx_DECREF_SET(__pyx_t_9, function);
9518  }
9519  }
9520  __pyx_t_8 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_16, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_15);
9521  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
9522  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9523  if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 549, __pyx_L1_error)
9524  __Pyx_GOTREF(__pyx_t_8);
9525  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9526  __pyx_t_9 = PyNumber_Negative(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 549, __pyx_L1_error)
9527  __Pyx_GOTREF(__pyx_t_9);
9528  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9529  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 549, __pyx_L1_error)
9530  __Pyx_GOTREF(__pyx_t_8);
9531  __Pyx_INCREF(__pyx_n_s_r);
9532  __Pyx_GIVEREF(__pyx_n_s_r);
9533  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_r);
9534  __Pyx_INCREF(__pyx_v_ci);
9535  __Pyx_GIVEREF(__pyx_v_ci);
9536  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
9537  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 549, __pyx_L1_error)
9538  __Pyx_GOTREF(__pyx_t_15);
9539  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9540  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 549, __pyx_L1_error)
9541  __Pyx_GOTREF(__pyx_t_8);
9542  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9543  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(1, 549, __pyx_L1_error)
9544  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9545  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9546 
9547  /* "ADR.pyx":550
9548  * for i in range(len(c[('u',ci)].flat)):
9549  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9550  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
9551  * def evaluate(self,t,c):
9552  * if self.timeVaryingCoefficients:
9553  */
9554  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 550, __pyx_L1_error)
9555  __Pyx_GOTREF(__pyx_t_8);
9556  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 550, __pyx_L1_error)
9557  __Pyx_GOTREF(__pyx_t_15);
9558  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9559  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 550, __pyx_L1_error)
9560  __Pyx_GOTREF(__pyx_t_8);
9561  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 550, __pyx_L1_error)
9562  __Pyx_GOTREF(__pyx_t_16);
9563  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9564  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 550, __pyx_L1_error)
9565  __Pyx_GOTREF(__pyx_t_8);
9566  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 550, __pyx_L1_error)
9567  __Pyx_GOTREF(__pyx_t_7);
9568  __pyx_t_14 = PyNumber_Multiply(__pyx_int_3, __pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 550, __pyx_L1_error)
9569  __Pyx_GOTREF(__pyx_t_14);
9570  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9571  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_16, 0, 0, &__pyx_t_8, &__pyx_t_14, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 550, __pyx_L1_error)
9572  __Pyx_GOTREF(__pyx_t_7);
9573  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9574  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9575  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9576  __pyx_t_14 = NULL;
9577  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
9578  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
9579  if (likely(__pyx_t_14)) {
9580  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
9581  __Pyx_INCREF(__pyx_t_14);
9582  __Pyx_INCREF(function);
9583  __Pyx_DECREF_SET(__pyx_t_15, function);
9584  }
9585  }
9586  __pyx_t_9 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_14, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_7);
9587  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
9588  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9589  if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 550, __pyx_L1_error)
9590  __Pyx_GOTREF(__pyx_t_9);
9591  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9592  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_flat); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 550, __pyx_L1_error)
9593  __Pyx_GOTREF(__pyx_t_15);
9594  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9595  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 550, __pyx_L1_error)
9596  __Pyx_GOTREF(__pyx_t_9);
9597  __Pyx_INCREF(__pyx_n_s_a);
9598  __Pyx_GIVEREF(__pyx_n_s_a);
9599  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_a);
9600  __Pyx_INCREF(__pyx_v_ci);
9601  __Pyx_GIVEREF(__pyx_v_ci);
9602  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ci);
9603  __Pyx_INCREF(__pyx_v_ci);
9604  __Pyx_GIVEREF(__pyx_v_ci);
9605  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_ci);
9606  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 550, __pyx_L1_error)
9607  __Pyx_GOTREF(__pyx_t_7);
9608  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9609  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 550, __pyx_L1_error)
9610  __Pyx_GOTREF(__pyx_t_9);
9611  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9612  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 550, __pyx_L1_error)
9613  __Pyx_GOTREF(__pyx_t_7);
9614  __pyx_t_14 = PyNumber_Multiply(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 550, __pyx_L1_error)
9615  __Pyx_GOTREF(__pyx_t_14);
9616  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9617  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 550, __pyx_L1_error)
9618  __Pyx_GOTREF(__pyx_t_7);
9619  __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 550, __pyx_L1_error)
9620  __Pyx_GOTREF(__pyx_t_8);
9621  __pyx_t_16 = PyNumber_Multiply(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 550, __pyx_L1_error)
9622  __Pyx_GOTREF(__pyx_t_16);
9623  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9624  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9625  if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_15, 0, 0, &__pyx_t_14, &__pyx_t_16, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 550, __pyx_L1_error)
9626  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
9627  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9628  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
9629  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
9630 
9631  /* "ADR.pyx":548
9632  * c[('df',ci,ci)].flat[:] = 0.0
9633  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)):
9634  * for i in range(len(c[('u',ci)].flat)): # <<<<<<<<<<<<<<
9635  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9636  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9637  */
9638  }
9639  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9640 
9641  /* "ADR.pyx":547
9642  * else:
9643  * c[('df',ci,ci)].flat[:] = 0.0
9644  * if c.has_key(('r',ci)) and c.has_key(('a',ci,ci)): # <<<<<<<<<<<<<<
9645  * for i in range(len(c[('u',ci)].flat)):
9646  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9647  */
9648  }
9649 
9650  /* "ADR.pyx":541
9651  * nd = self.nd
9652  * for c in [cebqe]:
9653  * for ci in range(self.nc): # <<<<<<<<<<<<<<
9654  * if c.has_key(('df',ci,ci)):
9655  * if self.velocity is not None:
9656  */
9657  }
9658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9659 
9660  /* "ADR.pyx":540
9661  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe):
9662  * nd = self.nd
9663  * for c in [cebqe]: # <<<<<<<<<<<<<<
9664  * for ci in range(self.nc):
9665  * if c.has_key(('df',ci,ci)):
9666  */
9667  }
9668  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9669 
9670  /* "ADR.pyx":538
9671  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9672  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9673  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
9674  * nd = self.nd
9675  * for c in [cebqe]:
9676  */
9677 
9678  /* function exit code */
9679  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9680  goto __pyx_L0;
9681  __pyx_L1_error:;
9682  __Pyx_XDECREF(__pyx_t_1);
9683  __Pyx_XDECREF(__pyx_t_2);
9684  __Pyx_XDECREF(__pyx_t_4);
9685  __Pyx_XDECREF(__pyx_t_7);
9686  __Pyx_XDECREF(__pyx_t_8);
9687  __Pyx_XDECREF(__pyx_t_9);
9688  __Pyx_XDECREF(__pyx_t_14);
9689  __Pyx_XDECREF(__pyx_t_15);
9690  __Pyx_XDECREF(__pyx_t_16);
9691  __Pyx_AddTraceback("ADR.Coefficients.initializeGlobalExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
9692  __pyx_r = NULL;
9693  __pyx_L0:;
9694  __Pyx_XDECREF(__pyx_v_nd);
9695  __Pyx_XDECREF(__pyx_v_c);
9696  __Pyx_XDECREF(__pyx_v_ci);
9697  __Pyx_XDECREF(__pyx_v_i);
9698  __Pyx_XGIVEREF(__pyx_r);
9699  __Pyx_RefNannyFinishContext();
9700  return __pyx_r;
9701 }
9702 
9703 /* "ADR.pyx":551
9704  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9705  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9706  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
9707  * if self.timeVaryingCoefficients:
9708  * nd = self.nd
9709  */
9710 
9711 /* Python wrapper */
9712 static PyObject *__pyx_pw_3ADR_12Coefficients_9evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9713 static PyMethodDef __pyx_mdef_3ADR_12Coefficients_9evaluate = {"evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_12Coefficients_9evaluate, METH_VARARGS|METH_KEYWORDS, 0};
9714 static PyObject *__pyx_pw_3ADR_12Coefficients_9evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9715  PyObject *__pyx_v_self = 0;
9716  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
9717  PyObject *__pyx_v_c = 0;
9718  PyObject *__pyx_r = 0;
9719  __Pyx_RefNannyDeclarations
9720  __Pyx_RefNannySetupContext("evaluate (wrapper)", 0);
9721  {
9722  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_t,&__pyx_n_s_c,0};
9723  PyObject* values[3] = {0,0,0};
9724  if (unlikely(__pyx_kwds)) {
9725  Py_ssize_t kw_args;
9726  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9727  switch (pos_args) {
9728  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9729  CYTHON_FALLTHROUGH;
9730  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9731  CYTHON_FALLTHROUGH;
9732  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9733  CYTHON_FALLTHROUGH;
9734  case 0: break;
9735  default: goto __pyx_L5_argtuple_error;
9736  }
9737  kw_args = PyDict_Size(__pyx_kwds);
9738  switch (pos_args) {
9739  case 0:
9740  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
9741  else goto __pyx_L5_argtuple_error;
9742  CYTHON_FALLTHROUGH;
9743  case 1:
9744  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9745  else {
9746  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, 1); __PYX_ERR(1, 551, __pyx_L3_error)
9747  }
9748  CYTHON_FALLTHROUGH;
9749  case 2:
9750  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
9751  else {
9752  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, 2); __PYX_ERR(1, 551, __pyx_L3_error)
9753  }
9754  }
9755  if (unlikely(kw_args > 0)) {
9756  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluate") < 0)) __PYX_ERR(1, 551, __pyx_L3_error)
9757  }
9758  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
9759  goto __pyx_L5_argtuple_error;
9760  } else {
9761  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9762  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9763  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9764  }
9765  __pyx_v_self = values[0];
9766  __pyx_v_t = values[1];
9767  __pyx_v_c = values[2];
9768  }
9769  goto __pyx_L4_argument_unpacking_done;
9770  __pyx_L5_argtuple_error:;
9771  __Pyx_RaiseArgtupleInvalid("evaluate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 551, __pyx_L3_error)
9772  __pyx_L3_error:;
9773  __Pyx_AddTraceback("ADR.Coefficients.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
9774  __Pyx_RefNannyFinishContext();
9775  return NULL;
9776  __pyx_L4_argument_unpacking_done:;
9777  __pyx_r = __pyx_pf_3ADR_12Coefficients_8evaluate(__pyx_self, __pyx_v_self, __pyx_v_t, __pyx_v_c);
9778 
9779  /* function exit code */
9780  __Pyx_RefNannyFinishContext();
9781  return __pyx_r;
9782 }
9783 
9784 static PyObject *__pyx_pf_3ADR_12Coefficients_8evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_t, PyObject *__pyx_v_c) {
9785  PyObject *__pyx_v_nd = NULL;
9786  PyObject *__pyx_v_ci = NULL;
9787  PyObject *__pyx_v_i = NULL;
9788  PyObject *__pyx_r = NULL;
9789  __Pyx_RefNannyDeclarations
9790  PyObject *__pyx_t_1 = NULL;
9791  int __pyx_t_2;
9792  PyObject *__pyx_t_3 = NULL;
9793  Py_ssize_t __pyx_t_4;
9794  PyObject *(*__pyx_t_5)(PyObject *);
9795  int __pyx_t_6;
9796  PyObject *__pyx_t_7 = NULL;
9797  PyObject *__pyx_t_8 = NULL;
9798  Py_ssize_t __pyx_t_9;
9799  PyObject *(*__pyx_t_10)(PyObject *);
9800  PyObject *__pyx_t_11 = NULL;
9801  PyObject *__pyx_t_12 = NULL;
9802  PyObject *__pyx_t_13 = NULL;
9803  PyObject *__pyx_t_14 = NULL;
9804  __Pyx_RefNannySetupContext("evaluate", 0);
9805 
9806  /* "ADR.pyx":552
9807  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9808  * def evaluate(self,t,c):
9809  * if self.timeVaryingCoefficients: # <<<<<<<<<<<<<<
9810  * nd = self.nd
9811  * for ci in range(self.nc):
9812  */
9813  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeVaryingCoefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 552, __pyx_L1_error)
9814  __Pyx_GOTREF(__pyx_t_1);
9815  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 552, __pyx_L1_error)
9816  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9817  if (__pyx_t_2) {
9818 
9819  /* "ADR.pyx":553
9820  * def evaluate(self,t,c):
9821  * if self.timeVaryingCoefficients:
9822  * nd = self.nd # <<<<<<<<<<<<<<
9823  * for ci in range(self.nc):
9824  * if self.velocity is not None:
9825  */
9826  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 553, __pyx_L1_error)
9827  __Pyx_GOTREF(__pyx_t_1);
9828  __pyx_v_nd = __pyx_t_1;
9829  __pyx_t_1 = 0;
9830 
9831  /* "ADR.pyx":554
9832  * if self.timeVaryingCoefficients:
9833  * nd = self.nd
9834  * for ci in range(self.nc): # <<<<<<<<<<<<<<
9835  * if self.velocity is not None:
9836  * c[('df',ci,ci)][...,:] = self.velocity
9837  */
9838  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 554, __pyx_L1_error)
9839  __Pyx_GOTREF(__pyx_t_1);
9840  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 554, __pyx_L1_error)
9841  __Pyx_GOTREF(__pyx_t_3);
9842  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9843  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
9844  __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
9845  __pyx_t_5 = NULL;
9846  } else {
9847  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 554, __pyx_L1_error)
9848  __Pyx_GOTREF(__pyx_t_1);
9849  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 554, __pyx_L1_error)
9850  }
9851  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9852  for (;;) {
9853  if (likely(!__pyx_t_5)) {
9854  if (likely(PyList_CheckExact(__pyx_t_1))) {
9855  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
9856  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9857  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 554, __pyx_L1_error)
9858  #else
9859  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 554, __pyx_L1_error)
9860  __Pyx_GOTREF(__pyx_t_3);
9861  #endif
9862  } else {
9863  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
9864  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9865  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 554, __pyx_L1_error)
9866  #else
9867  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 554, __pyx_L1_error)
9868  __Pyx_GOTREF(__pyx_t_3);
9869  #endif
9870  }
9871  } else {
9872  __pyx_t_3 = __pyx_t_5(__pyx_t_1);
9873  if (unlikely(!__pyx_t_3)) {
9874  PyObject* exc_type = PyErr_Occurred();
9875  if (exc_type) {
9876  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9877  else __PYX_ERR(1, 554, __pyx_L1_error)
9878  }
9879  break;
9880  }
9881  __Pyx_GOTREF(__pyx_t_3);
9882  }
9883  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_3);
9884  __pyx_t_3 = 0;
9885 
9886  /* "ADR.pyx":555
9887  * nd = self.nd
9888  * for ci in range(self.nc):
9889  * if self.velocity is not None: # <<<<<<<<<<<<<<
9890  * c[('df',ci,ci)][...,:] = self.velocity
9891  * else:
9892  */
9893  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 555, __pyx_L1_error)
9894  __Pyx_GOTREF(__pyx_t_3);
9895  __pyx_t_2 = (__pyx_t_3 != Py_None);
9896  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9897  __pyx_t_6 = (__pyx_t_2 != 0);
9898  if (__pyx_t_6) {
9899 
9900  /* "ADR.pyx":556
9901  * for ci in range(self.nc):
9902  * if self.velocity is not None:
9903  * c[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
9904  * else:
9905  * c[('df',ci,ci)].flat[:] = 0.0
9906  */
9907  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_velocity); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 556, __pyx_L1_error)
9908  __Pyx_GOTREF(__pyx_t_3);
9909  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 556, __pyx_L1_error)
9910  __Pyx_GOTREF(__pyx_t_7);
9911  __Pyx_INCREF(__pyx_n_s_df);
9912  __Pyx_GIVEREF(__pyx_n_s_df);
9913  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_df);
9914  __Pyx_INCREF(__pyx_v_ci);
9915  __Pyx_GIVEREF(__pyx_v_ci);
9916  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ci);
9917  __Pyx_INCREF(__pyx_v_ci);
9918  __Pyx_GIVEREF(__pyx_v_ci);
9919  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_ci);
9920  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 556, __pyx_L1_error)
9921  __Pyx_GOTREF(__pyx_t_8);
9922  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9923  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_tuple__5, __pyx_t_3) < 0)) __PYX_ERR(1, 556, __pyx_L1_error)
9924  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9925  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9926 
9927  /* "ADR.pyx":555
9928  * nd = self.nd
9929  * for ci in range(self.nc):
9930  * if self.velocity is not None: # <<<<<<<<<<<<<<
9931  * c[('df',ci,ci)][...,:] = self.velocity
9932  * else:
9933  */
9934  goto __pyx_L6;
9935  }
9936 
9937  /* "ADR.pyx":558
9938  * c[('df',ci,ci)][...,:] = self.velocity
9939  * else:
9940  * c[('df',ci,ci)].flat[:] = 0.0 # <<<<<<<<<<<<<<
9941  * for i in range(len(c[('r',ci)].flat)):
9942  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9943  */
9944  /*else*/ {
9945  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 558, __pyx_L1_error)
9946  __Pyx_GOTREF(__pyx_t_3);
9947  __Pyx_INCREF(__pyx_n_s_df);
9948  __Pyx_GIVEREF(__pyx_n_s_df);
9949  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_df);
9950  __Pyx_INCREF(__pyx_v_ci);
9951  __Pyx_GIVEREF(__pyx_v_ci);
9952  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ci);
9953  __Pyx_INCREF(__pyx_v_ci);
9954  __Pyx_GIVEREF(__pyx_v_ci);
9955  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_ci);
9956  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 558, __pyx_L1_error)
9957  __Pyx_GOTREF(__pyx_t_8);
9958  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9959  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 558, __pyx_L1_error)
9960  __Pyx_GOTREF(__pyx_t_3);
9961  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9962  if (__Pyx_PyObject_SetSlice(__pyx_t_3, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__3, 0, 0, 1) < 0) __PYX_ERR(1, 558, __pyx_L1_error)
9963  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9964  }
9965  __pyx_L6:;
9966 
9967  /* "ADR.pyx":559
9968  * else:
9969  * c[('df',ci,ci)].flat[:] = 0.0
9970  * for i in range(len(c[('r',ci)].flat)): # <<<<<<<<<<<<<<
9971  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
9972  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
9973  */
9974  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 559, __pyx_L1_error)
9975  __Pyx_GOTREF(__pyx_t_3);
9976  __Pyx_INCREF(__pyx_n_s_r);
9977  __Pyx_GIVEREF(__pyx_n_s_r);
9978  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_r);
9979  __Pyx_INCREF(__pyx_v_ci);
9980  __Pyx_GIVEREF(__pyx_v_ci);
9981  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ci);
9982  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 559, __pyx_L1_error)
9983  __Pyx_GOTREF(__pyx_t_8);
9984  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9985  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 559, __pyx_L1_error)
9986  __Pyx_GOTREF(__pyx_t_3);
9987  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9988  __pyx_t_9 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 559, __pyx_L1_error)
9989  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9990  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 559, __pyx_L1_error)
9991  __Pyx_GOTREF(__pyx_t_3);
9992  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 559, __pyx_L1_error)
9993  __Pyx_GOTREF(__pyx_t_8);
9994  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9995  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
9996  __pyx_t_3 = __pyx_t_8; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
9997  __pyx_t_10 = NULL;
9998  } else {
9999  __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 559, __pyx_L1_error)
10000  __Pyx_GOTREF(__pyx_t_3);
10001  __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 559, __pyx_L1_error)
10002  }
10003  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10004  for (;;) {
10005  if (likely(!__pyx_t_10)) {
10006  if (likely(PyList_CheckExact(__pyx_t_3))) {
10007  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
10008  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10009  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 559, __pyx_L1_error)
10010  #else
10011  __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 559, __pyx_L1_error)
10012  __Pyx_GOTREF(__pyx_t_8);
10013  #endif
10014  } else {
10015  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
10016  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10017  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 559, __pyx_L1_error)
10018  #else
10019  __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 559, __pyx_L1_error)
10020  __Pyx_GOTREF(__pyx_t_8);
10021  #endif
10022  }
10023  } else {
10024  __pyx_t_8 = __pyx_t_10(__pyx_t_3);
10025  if (unlikely(!__pyx_t_8)) {
10026  PyObject* exc_type = PyErr_Occurred();
10027  if (exc_type) {
10028  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
10029  else __PYX_ERR(1, 559, __pyx_L1_error)
10030  }
10031  break;
10032  }
10033  __Pyx_GOTREF(__pyx_t_8);
10034  }
10035  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
10036  __pyx_t_8 = 0;
10037 
10038  /* "ADR.pyx":560
10039  * c[('df',ci,ci)].flat[:] = 0.0
10040  * for i in range(len(c[('r',ci)].flat)):
10041  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)]) # <<<<<<<<<<<<<<
10042  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10043  *
10044  */
10045  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fOfX); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 560, __pyx_L1_error)
10046  __Pyx_GOTREF(__pyx_t_7);
10047  __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 560, __pyx_L1_error)
10048  __Pyx_GOTREF(__pyx_t_11);
10049  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10050  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 560, __pyx_L1_error)
10051  __Pyx_GOTREF(__pyx_t_7);
10052  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 560, __pyx_L1_error)
10053  __Pyx_GOTREF(__pyx_t_12);
10054  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10055  __pyx_t_7 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 560, __pyx_L1_error)
10056  __Pyx_GOTREF(__pyx_t_7);
10057  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 560, __pyx_L1_error)
10058  __Pyx_GOTREF(__pyx_t_13);
10059  __pyx_t_14 = PyNumber_Multiply(__pyx_int_3, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 560, __pyx_L1_error)
10060  __Pyx_GOTREF(__pyx_t_14);
10061  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10062  __pyx_t_13 = __Pyx_PyObject_GetSlice(__pyx_t_12, 0, 0, &__pyx_t_7, &__pyx_t_14, NULL, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 560, __pyx_L1_error)
10063  __Pyx_GOTREF(__pyx_t_13);
10064  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10065  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10066  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10067  __pyx_t_14 = NULL;
10068  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
10069  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
10070  if (likely(__pyx_t_14)) {
10071  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
10072  __Pyx_INCREF(__pyx_t_14);
10073  __Pyx_INCREF(function);
10074  __Pyx_DECREF_SET(__pyx_t_11, function);
10075  }
10076  }
10077  __pyx_t_8 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_13);
10078  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10079  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10080  if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 560, __pyx_L1_error)
10081  __Pyx_GOTREF(__pyx_t_8);
10082  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10083  __pyx_t_11 = PyNumber_Negative(__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 560, __pyx_L1_error)
10084  __Pyx_GOTREF(__pyx_t_11);
10085  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10086  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 560, __pyx_L1_error)
10087  __Pyx_GOTREF(__pyx_t_8);
10088  __Pyx_INCREF(__pyx_n_s_r);
10089  __Pyx_GIVEREF(__pyx_n_s_r);
10090  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_r);
10091  __Pyx_INCREF(__pyx_v_ci);
10092  __Pyx_GIVEREF(__pyx_v_ci);
10093  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ci);
10094  __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 560, __pyx_L1_error)
10095  __Pyx_GOTREF(__pyx_t_13);
10096  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10097  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 560, __pyx_L1_error)
10098  __Pyx_GOTREF(__pyx_t_8);
10099  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10100  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_i, __pyx_t_11) < 0)) __PYX_ERR(1, 560, __pyx_L1_error)
10101  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10102  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10103 
10104  /* "ADR.pyx":561
10105  * for i in range(len(c[('r',ci)].flat)):
10106  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
10107  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat # <<<<<<<<<<<<<<
10108  *
10109  * class LevelModel(proteus.Transport.OneLevelTransport):
10110  */
10111  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_aOfX); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 561, __pyx_L1_error)
10112  __Pyx_GOTREF(__pyx_t_8);
10113  __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_ci); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 561, __pyx_L1_error)
10114  __Pyx_GOTREF(__pyx_t_13);
10115  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10116  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_c, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 561, __pyx_L1_error)
10117  __Pyx_GOTREF(__pyx_t_8);
10118  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_flat); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 561, __pyx_L1_error)
10119  __Pyx_GOTREF(__pyx_t_14);
10120  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10121  __pyx_t_8 = PyNumber_Multiply(__pyx_int_3, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 561, __pyx_L1_error)
10122  __Pyx_GOTREF(__pyx_t_8);
10123  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 561, __pyx_L1_error)
10124  __Pyx_GOTREF(__pyx_t_7);
10125  __pyx_t_12 = PyNumber_Multiply(__pyx_int_3, __pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 561, __pyx_L1_error)
10126  __Pyx_GOTREF(__pyx_t_12);
10127  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10128  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_14, 0, 0, &__pyx_t_8, &__pyx_t_12, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 561, __pyx_L1_error)
10129  __Pyx_GOTREF(__pyx_t_7);
10130  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10131  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10132  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10133  __pyx_t_12 = NULL;
10134  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
10135  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
10136  if (likely(__pyx_t_12)) {
10137  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
10138  __Pyx_INCREF(__pyx_t_12);
10139  __Pyx_INCREF(function);
10140  __Pyx_DECREF_SET(__pyx_t_13, function);
10141  }
10142  }
10143  __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_12, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_7);
10144  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
10145  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10146  if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 561, __pyx_L1_error)
10147  __Pyx_GOTREF(__pyx_t_11);
10148  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10149  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_flat); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 561, __pyx_L1_error)
10150  __Pyx_GOTREF(__pyx_t_13);
10151  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10152  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 561, __pyx_L1_error)
10153  __Pyx_GOTREF(__pyx_t_11);
10154  __Pyx_INCREF(__pyx_n_s_a);
10155  __Pyx_GIVEREF(__pyx_n_s_a);
10156  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_a);
10157  __Pyx_INCREF(__pyx_v_ci);
10158  __Pyx_GIVEREF(__pyx_v_ci);
10159  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ci);
10160  __Pyx_INCREF(__pyx_v_ci);
10161  __Pyx_GIVEREF(__pyx_v_ci);
10162  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_ci);
10163  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_c, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 561, __pyx_L1_error)
10164  __Pyx_GOTREF(__pyx_t_7);
10165  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10166  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_flat); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 561, __pyx_L1_error)
10167  __Pyx_GOTREF(__pyx_t_11);
10168  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10169  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 561, __pyx_L1_error)
10170  __Pyx_GOTREF(__pyx_t_7);
10171  __pyx_t_12 = PyNumber_Multiply(__pyx_t_7, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 561, __pyx_L1_error)
10172  __Pyx_GOTREF(__pyx_t_12);
10173  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10174  __pyx_t_7 = PyNumber_Multiply(__pyx_v_nd, __pyx_v_nd); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 561, __pyx_L1_error)
10175  __Pyx_GOTREF(__pyx_t_7);
10176  __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 561, __pyx_L1_error)
10177  __Pyx_GOTREF(__pyx_t_8);
10178  __pyx_t_14 = PyNumber_Multiply(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 561, __pyx_L1_error)
10179  __Pyx_GOTREF(__pyx_t_14);
10180  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10181  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10182  if (__Pyx_PyObject_SetSlice(__pyx_t_11, __pyx_t_13, 0, 0, &__pyx_t_12, &__pyx_t_14, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 561, __pyx_L1_error)
10183  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
10184  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10185  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10186  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10187 
10188  /* "ADR.pyx":559
10189  * else:
10190  * c[('df',ci,ci)].flat[:] = 0.0
10191  * for i in range(len(c[('r',ci)].flat)): # <<<<<<<<<<<<<<
10192  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
10193  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10194  */
10195  }
10196  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10197 
10198  /* "ADR.pyx":554
10199  * if self.timeVaryingCoefficients:
10200  * nd = self.nd
10201  * for ci in range(self.nc): # <<<<<<<<<<<<<<
10202  * if self.velocity is not None:
10203  * c[('df',ci,ci)][...,:] = self.velocity
10204  */
10205  }
10206  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10207 
10208  /* "ADR.pyx":552
10209  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10210  * def evaluate(self,t,c):
10211  * if self.timeVaryingCoefficients: # <<<<<<<<<<<<<<
10212  * nd = self.nd
10213  * for ci in range(self.nc):
10214  */
10215  }
10216 
10217  /* "ADR.pyx":551
10218  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
10219  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
10220  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
10221  * if self.timeVaryingCoefficients:
10222  * nd = self.nd
10223  */
10224 
10225  /* function exit code */
10226  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10227  goto __pyx_L0;
10228  __pyx_L1_error:;
10229  __Pyx_XDECREF(__pyx_t_1);
10230  __Pyx_XDECREF(__pyx_t_3);
10231  __Pyx_XDECREF(__pyx_t_7);
10232  __Pyx_XDECREF(__pyx_t_8);
10233  __Pyx_XDECREF(__pyx_t_11);
10234  __Pyx_XDECREF(__pyx_t_12);
10235  __Pyx_XDECREF(__pyx_t_13);
10236  __Pyx_XDECREF(__pyx_t_14);
10237  __Pyx_AddTraceback("ADR.Coefficients.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
10238  __pyx_r = NULL;
10239  __pyx_L0:;
10240  __Pyx_XDECREF(__pyx_v_nd);
10241  __Pyx_XDECREF(__pyx_v_ci);
10242  __Pyx_XDECREF(__pyx_v_i);
10243  __Pyx_XGIVEREF(__pyx_r);
10244  __Pyx_RefNannyFinishContext();
10245  return __pyx_r;
10246 }
10247 
10248 /* "ADR.pyx":571
10249  * """
10250  * nCalls=0
10251  * def __init__(self, # <<<<<<<<<<<<<<
10252  * uDict,
10253  * phiDict,
10254  */
10255 
10256 /* Python wrapper */
10257 static PyObject *__pyx_pw_3ADR_10LevelModel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10258 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_10LevelModel_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
10259 static PyObject *__pyx_pw_3ADR_10LevelModel_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10260  PyObject *__pyx_v_self = 0;
10261  PyObject *__pyx_v_uDict = 0;
10262  PyObject *__pyx_v_phiDict = 0;
10263  PyObject *__pyx_v_testSpaceDict = 0;
10264  PyObject *__pyx_v_matType = 0;
10265  PyObject *__pyx_v_dofBoundaryConditionsDict = 0;
10266  PyObject *__pyx_v_dofBoundaryConditionsSetterDict = 0;
10267  PyObject *__pyx_v_coefficients = 0;
10268  PyObject *__pyx_v_elementQuadrature = 0;
10269  PyObject *__pyx_v_elementBoundaryQuadrature = 0;
10270  PyObject *__pyx_v_fluxBoundaryConditionsDict = 0;
10271  PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict = 0;
10272  PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict = 0;
10273  CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict = 0;
10274  PyObject *__pyx_v_stabilization = 0;
10275  PyObject *__pyx_v_shockCapturing = 0;
10276  PyObject *__pyx_v_conservativeFluxDict = 0;
10277  PyObject *__pyx_v_numericalFluxType = 0;
10278  PyObject *__pyx_v_TimeIntegrationClass = 0;
10279  PyObject *__pyx_v_massLumping = 0;
10280  PyObject *__pyx_v_reactionLumping = 0;
10281  PyObject *__pyx_v_options = 0;
10282  PyObject *__pyx_v_name = 0;
10283  PyObject *__pyx_v_reuse_trial_and_test_quadrature = 0;
10284  PyObject *__pyx_v_sd = 0;
10285  PyObject *__pyx_v_movingDomain = 0;
10286  PyObject *__pyx_r = 0;
10287  __Pyx_RefNannyDeclarations
10288  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
10289  {
10290  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_uDict,&__pyx_n_s_phiDict,&__pyx_n_s_testSpaceDict,&__pyx_n_s_matType,&__pyx_n_s_dofBoundaryConditionsDict,&__pyx_n_s_dofBoundaryConditionsSetterDict,&__pyx_n_s_coefficients,&__pyx_n_s_elementQuadrature,&__pyx_n_s_elementBoundaryQuadrature,&__pyx_n_s_fluxBoundaryConditionsDict,&__pyx_n_s_advectiveFluxBoundaryConditionsS,&__pyx_n_s_diffusiveFluxBoundaryConditionsS,&__pyx_n_s_stressTraceBoundaryConditionsSet,&__pyx_n_s_stabilization,&__pyx_n_s_shockCapturing,&__pyx_n_s_conservativeFluxDict,&__pyx_n_s_numericalFluxType,&__pyx_n_s_TimeIntegrationClass,&__pyx_n_s_massLumping,&__pyx_n_s_reactionLumping,&__pyx_n_s_options,&__pyx_n_s_name,&__pyx_n_s_reuse_trial_and_test_quadrature,&__pyx_n_s_sd,&__pyx_n_s_movingDomain,0};
10291  PyObject* values[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
10292 
10293  /* "ADR.pyx":581
10294  * elementQuadrature,
10295  * elementBoundaryQuadrature,
10296  * fluxBoundaryConditionsDict=None, # <<<<<<<<<<<<<<
10297  * advectiveFluxBoundaryConditionsSetterDict=None,
10298  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10299  */
10300  values[10] = ((PyObject *)((PyObject *)Py_None));
10301 
10302  /* "ADR.pyx":582
10303  * elementBoundaryQuadrature,
10304  * fluxBoundaryConditionsDict=None,
10305  * advectiveFluxBoundaryConditionsSetterDict=None, # <<<<<<<<<<<<<<
10306  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10307  * stressTraceBoundaryConditionsSetterDict=None,
10308  */
10309  values[11] = ((PyObject *)((PyObject *)Py_None));
10310 
10311  /* "ADR.pyx":583
10312  * fluxBoundaryConditionsDict=None,
10313  * advectiveFluxBoundaryConditionsSetterDict=None,
10314  * diffusiveFluxBoundaryConditionsSetterDictDict=None, # <<<<<<<<<<<<<<
10315  * stressTraceBoundaryConditionsSetterDict=None,
10316  * stabilization=None,
10317  */
10318  values[12] = ((PyObject *)((PyObject *)Py_None));
10319 
10320  /* "ADR.pyx":584
10321  * advectiveFluxBoundaryConditionsSetterDict=None,
10322  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10323  * stressTraceBoundaryConditionsSetterDict=None, # <<<<<<<<<<<<<<
10324  * stabilization=None,
10325  * shockCapturing=None,
10326  */
10327  values[13] = ((PyObject *)((PyObject *)Py_None));
10328 
10329  /* "ADR.pyx":585
10330  * diffusiveFluxBoundaryConditionsSetterDictDict=None,
10331  * stressTraceBoundaryConditionsSetterDict=None,
10332  * stabilization=None, # <<<<<<<<<<<<<<
10333  * shockCapturing=None,
10334  * conservativeFluxDict=None,
10335  */
10336  values[14] = ((PyObject *)((PyObject *)Py_None));
10337 
10338  /* "ADR.pyx":586
10339  * stressTraceBoundaryConditionsSetterDict=None,
10340  * stabilization=None,
10341  * shockCapturing=None, # <<<<<<<<<<<<<<
10342  * conservativeFluxDict=None,
10343  * numericalFluxType=None,
10344  */
10345  values[15] = ((PyObject *)((PyObject *)Py_None));
10346 
10347  /* "ADR.pyx":587
10348  * stabilization=None,
10349  * shockCapturing=None,
10350  * conservativeFluxDict=None, # <<<<<<<<<<<<<<
10351  * numericalFluxType=None,
10352  * TimeIntegrationClass=None,
10353  */
10354  values[16] = ((PyObject *)((PyObject *)Py_None));
10355 
10356  /* "ADR.pyx":588
10357  * shockCapturing=None,
10358  * conservativeFluxDict=None,
10359  * numericalFluxType=None, # <<<<<<<<<<<<<<
10360  * TimeIntegrationClass=None,
10361  * massLumping=False,
10362  */
10363  values[17] = ((PyObject *)((PyObject *)Py_None));
10364 
10365  /* "ADR.pyx":589
10366  * conservativeFluxDict=None,
10367  * numericalFluxType=None,
10368  * TimeIntegrationClass=None, # <<<<<<<<<<<<<<
10369  * massLumping=False,
10370  * reactionLumping=False,
10371  */
10372  values[18] = ((PyObject *)((PyObject *)Py_None));
10373 
10374  /* "ADR.pyx":590
10375  * numericalFluxType=None,
10376  * TimeIntegrationClass=None,
10377  * massLumping=False, # <<<<<<<<<<<<<<
10378  * reactionLumping=False,
10379  * options=None,
10380  */
10381  values[19] = ((PyObject *)((PyObject *)Py_False));
10382 
10383  /* "ADR.pyx":591
10384  * TimeIntegrationClass=None,
10385  * massLumping=False,
10386  * reactionLumping=False, # <<<<<<<<<<<<<<
10387  * options=None,
10388  * name='defaultName',
10389  */
10390  values[20] = ((PyObject *)((PyObject *)Py_False));
10391 
10392  /* "ADR.pyx":592
10393  * massLumping=False,
10394  * reactionLumping=False,
10395  * options=None, # <<<<<<<<<<<<<<
10396  * name='defaultName',
10397  * reuse_trial_and_test_quadrature=True,
10398  */
10399  values[21] = ((PyObject *)((PyObject *)Py_None));
10400  values[22] = ((PyObject *)((PyObject*)__pyx_n_s_defaultName));
10401 
10402  /* "ADR.pyx":594
10403  * options=None,
10404  * name='defaultName',
10405  * reuse_trial_and_test_quadrature=True, # <<<<<<<<<<<<<<
10406  * sd = True,
10407  * movingDomain=False):#,
10408  */
10409  values[23] = ((PyObject *)((PyObject *)Py_True));
10410 
10411  /* "ADR.pyx":595
10412  * name='defaultName',
10413  * reuse_trial_and_test_quadrature=True,
10414  * sd = True, # <<<<<<<<<<<<<<
10415  * movingDomain=False):#,
10416  * from proteus import Comm
10417  */
10418  values[24] = ((PyObject *)((PyObject *)Py_True));
10419 
10420  /* "ADR.pyx":596
10421  * reuse_trial_and_test_quadrature=True,
10422  * sd = True,
10423  * movingDomain=False):#, # <<<<<<<<<<<<<<
10424  * from proteus import Comm
10425  * #
10426  */
10427  values[25] = ((PyObject *)((PyObject *)Py_False));
10428  if (unlikely(__pyx_kwds)) {
10429  Py_ssize_t kw_args;
10430  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10431  switch (pos_args) {
10432  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
10433  CYTHON_FALLTHROUGH;
10434  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10435  CYTHON_FALLTHROUGH;
10436  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10437  CYTHON_FALLTHROUGH;
10438  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10439  CYTHON_FALLTHROUGH;
10440  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10441  CYTHON_FALLTHROUGH;
10442  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10443  CYTHON_FALLTHROUGH;
10444  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10445  CYTHON_FALLTHROUGH;
10446  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10447  CYTHON_FALLTHROUGH;
10448  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10449  CYTHON_FALLTHROUGH;
10450  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10451  CYTHON_FALLTHROUGH;
10452  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10453  CYTHON_FALLTHROUGH;
10454  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10455  CYTHON_FALLTHROUGH;
10456  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10457  CYTHON_FALLTHROUGH;
10458  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10459  CYTHON_FALLTHROUGH;
10460  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10461  CYTHON_FALLTHROUGH;
10462  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10463  CYTHON_FALLTHROUGH;
10464  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10465  CYTHON_FALLTHROUGH;
10466  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10467  CYTHON_FALLTHROUGH;
10468  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10469  CYTHON_FALLTHROUGH;
10470  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10471  CYTHON_FALLTHROUGH;
10472  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10473  CYTHON_FALLTHROUGH;
10474  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10475  CYTHON_FALLTHROUGH;
10476  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10477  CYTHON_FALLTHROUGH;
10478  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10479  CYTHON_FALLTHROUGH;
10480  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10481  CYTHON_FALLTHROUGH;
10482  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10483  CYTHON_FALLTHROUGH;
10484  case 0: break;
10485  default: goto __pyx_L5_argtuple_error;
10486  }
10487  kw_args = PyDict_Size(__pyx_kwds);
10488  switch (pos_args) {
10489  case 0:
10490  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
10491  else goto __pyx_L5_argtuple_error;
10492  CYTHON_FALLTHROUGH;
10493  case 1:
10494  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uDict)) != 0)) kw_args--;
10495  else {
10496  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 1); __PYX_ERR(1, 571, __pyx_L3_error)
10497  }
10498  CYTHON_FALLTHROUGH;
10499  case 2:
10500  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_phiDict)) != 0)) kw_args--;
10501  else {
10502  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 2); __PYX_ERR(1, 571, __pyx_L3_error)
10503  }
10504  CYTHON_FALLTHROUGH;
10505  case 3:
10506  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_testSpaceDict)) != 0)) kw_args--;
10507  else {
10508  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 3); __PYX_ERR(1, 571, __pyx_L3_error)
10509  }
10510  CYTHON_FALLTHROUGH;
10511  case 4:
10512  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_matType)) != 0)) kw_args--;
10513  else {
10514  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 4); __PYX_ERR(1, 571, __pyx_L3_error)
10515  }
10516  CYTHON_FALLTHROUGH;
10517  case 5:
10518  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dofBoundaryConditionsDict)) != 0)) kw_args--;
10519  else {
10520  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 5); __PYX_ERR(1, 571, __pyx_L3_error)
10521  }
10522  CYTHON_FALLTHROUGH;
10523  case 6:
10524  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dofBoundaryConditionsSetterDict)) != 0)) kw_args--;
10525  else {
10526  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 6); __PYX_ERR(1, 571, __pyx_L3_error)
10527  }
10528  CYTHON_FALLTHROUGH;
10529  case 7:
10530  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coefficients)) != 0)) kw_args--;
10531  else {
10532  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 7); __PYX_ERR(1, 571, __pyx_L3_error)
10533  }
10534  CYTHON_FALLTHROUGH;
10535  case 8:
10536  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementQuadrature)) != 0)) kw_args--;
10537  else {
10538  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 8); __PYX_ERR(1, 571, __pyx_L3_error)
10539  }
10540  CYTHON_FALLTHROUGH;
10541  case 9:
10542  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementBoundaryQuadrature)) != 0)) kw_args--;
10543  else {
10544  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, 9); __PYX_ERR(1, 571, __pyx_L3_error)
10545  }
10546  CYTHON_FALLTHROUGH;
10547  case 10:
10548  if (kw_args > 0) {
10549  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fluxBoundaryConditionsDict);
10550  if (value) { values[10] = value; kw_args--; }
10551  }
10552  CYTHON_FALLTHROUGH;
10553  case 11:
10554  if (kw_args > 0) {
10555  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advectiveFluxBoundaryConditionsS);
10556  if (value) { values[11] = value; kw_args--; }
10557  }
10558  CYTHON_FALLTHROUGH;
10559  case 12:
10560  if (kw_args > 0) {
10561  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_diffusiveFluxBoundaryConditionsS);
10562  if (value) { values[12] = value; kw_args--; }
10563  }
10564  CYTHON_FALLTHROUGH;
10565  case 13:
10566  if (kw_args > 0) {
10567  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stressTraceBoundaryConditionsSet);
10568  if (value) { values[13] = value; kw_args--; }
10569  }
10570  CYTHON_FALLTHROUGH;
10571  case 14:
10572  if (kw_args > 0) {
10573  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stabilization);
10574  if (value) { values[14] = value; kw_args--; }
10575  }
10576  CYTHON_FALLTHROUGH;
10577  case 15:
10578  if (kw_args > 0) {
10579  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shockCapturing);
10580  if (value) { values[15] = value; kw_args--; }
10581  }
10582  CYTHON_FALLTHROUGH;
10583  case 16:
10584  if (kw_args > 0) {
10585  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_conservativeFluxDict);
10586  if (value) { values[16] = value; kw_args--; }
10587  }
10588  CYTHON_FALLTHROUGH;
10589  case 17:
10590  if (kw_args > 0) {
10591  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numericalFluxType);
10592  if (value) { values[17] = value; kw_args--; }
10593  }
10594  CYTHON_FALLTHROUGH;
10595  case 18:
10596  if (kw_args > 0) {
10597  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_TimeIntegrationClass);
10598  if (value) { values[18] = value; kw_args--; }
10599  }
10600  CYTHON_FALLTHROUGH;
10601  case 19:
10602  if (kw_args > 0) {
10603  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_massLumping);
10604  if (value) { values[19] = value; kw_args--; }
10605  }
10606  CYTHON_FALLTHROUGH;
10607  case 20:
10608  if (kw_args > 0) {
10609  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reactionLumping);
10610  if (value) { values[20] = value; kw_args--; }
10611  }
10612  CYTHON_FALLTHROUGH;
10613  case 21:
10614  if (kw_args > 0) {
10615  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options);
10616  if (value) { values[21] = value; kw_args--; }
10617  }
10618  CYTHON_FALLTHROUGH;
10619  case 22:
10620  if (kw_args > 0) {
10621  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
10622  if (value) { values[22] = value; kw_args--; }
10623  }
10624  CYTHON_FALLTHROUGH;
10625  case 23:
10626  if (kw_args > 0) {
10627  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reuse_trial_and_test_quadrature);
10628  if (value) { values[23] = value; kw_args--; }
10629  }
10630  CYTHON_FALLTHROUGH;
10631  case 24:
10632  if (kw_args > 0) {
10633  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sd);
10634  if (value) { values[24] = value; kw_args--; }
10635  }
10636  CYTHON_FALLTHROUGH;
10637  case 25:
10638  if (kw_args > 0) {
10639  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_movingDomain);
10640  if (value) { values[25] = value; kw_args--; }
10641  }
10642  }
10643  if (unlikely(kw_args > 0)) {
10644  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 571, __pyx_L3_error)
10645  }
10646  } else {
10647  switch (PyTuple_GET_SIZE(__pyx_args)) {
10648  case 26: values[25] = PyTuple_GET_ITEM(__pyx_args, 25);
10649  CYTHON_FALLTHROUGH;
10650  case 25: values[24] = PyTuple_GET_ITEM(__pyx_args, 24);
10651  CYTHON_FALLTHROUGH;
10652  case 24: values[23] = PyTuple_GET_ITEM(__pyx_args, 23);
10653  CYTHON_FALLTHROUGH;
10654  case 23: values[22] = PyTuple_GET_ITEM(__pyx_args, 22);
10655  CYTHON_FALLTHROUGH;
10656  case 22: values[21] = PyTuple_GET_ITEM(__pyx_args, 21);
10657  CYTHON_FALLTHROUGH;
10658  case 21: values[20] = PyTuple_GET_ITEM(__pyx_args, 20);
10659  CYTHON_FALLTHROUGH;
10660  case 20: values[19] = PyTuple_GET_ITEM(__pyx_args, 19);
10661  CYTHON_FALLTHROUGH;
10662  case 19: values[18] = PyTuple_GET_ITEM(__pyx_args, 18);
10663  CYTHON_FALLTHROUGH;
10664  case 18: values[17] = PyTuple_GET_ITEM(__pyx_args, 17);
10665  CYTHON_FALLTHROUGH;
10666  case 17: values[16] = PyTuple_GET_ITEM(__pyx_args, 16);
10667  CYTHON_FALLTHROUGH;
10668  case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
10669  CYTHON_FALLTHROUGH;
10670  case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
10671  CYTHON_FALLTHROUGH;
10672  case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
10673  CYTHON_FALLTHROUGH;
10674  case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
10675  CYTHON_FALLTHROUGH;
10676  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
10677  CYTHON_FALLTHROUGH;
10678  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
10679  CYTHON_FALLTHROUGH;
10680  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
10681  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
10682  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
10683  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
10684  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
10685  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
10686  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10687  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10688  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10689  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10690  break;
10691  default: goto __pyx_L5_argtuple_error;
10692  }
10693  }
10694  __pyx_v_self = values[0];
10695  __pyx_v_uDict = values[1];
10696  __pyx_v_phiDict = values[2];
10697  __pyx_v_testSpaceDict = values[3];
10698  __pyx_v_matType = values[4];
10699  __pyx_v_dofBoundaryConditionsDict = values[5];
10700  __pyx_v_dofBoundaryConditionsSetterDict = values[6];
10701  __pyx_v_coefficients = values[7];
10702  __pyx_v_elementQuadrature = values[8];
10703  __pyx_v_elementBoundaryQuadrature = values[9];
10704  __pyx_v_fluxBoundaryConditionsDict = values[10];
10705  __pyx_v_advectiveFluxBoundaryConditionsSetterDict = values[11];
10706  __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict = values[12];
10707  __pyx_v_stressTraceBoundaryConditionsSetterDict = values[13];
10708  __pyx_v_stabilization = values[14];
10709  __pyx_v_shockCapturing = values[15];
10710  __pyx_v_conservativeFluxDict = values[16];
10711  __pyx_v_numericalFluxType = values[17];
10712  __pyx_v_TimeIntegrationClass = values[18];
10713  __pyx_v_massLumping = values[19];
10714  __pyx_v_reactionLumping = values[20];
10715  __pyx_v_options = values[21];
10716  __pyx_v_name = values[22];
10717  __pyx_v_reuse_trial_and_test_quadrature = values[23];
10718  __pyx_v_sd = values[24];
10719  __pyx_v_movingDomain = values[25];
10720  }
10721  goto __pyx_L4_argument_unpacking_done;
10722  __pyx_L5_argtuple_error:;
10723  __Pyx_RaiseArgtupleInvalid("__init__", 0, 10, 26, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 571, __pyx_L3_error)
10724  __pyx_L3_error:;
10725  __Pyx_AddTraceback("ADR.LevelModel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10726  __Pyx_RefNannyFinishContext();
10727  return NULL;
10728  __pyx_L4_argument_unpacking_done:;
10729  __pyx_r = __pyx_pf_3ADR_10LevelModel___init__(__pyx_self, __pyx_v_self, __pyx_v_uDict, __pyx_v_phiDict, __pyx_v_testSpaceDict, __pyx_v_matType, __pyx_v_dofBoundaryConditionsDict, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_coefficients, __pyx_v_elementQuadrature, __pyx_v_elementBoundaryQuadrature, __pyx_v_fluxBoundaryConditionsDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_v_stressTraceBoundaryConditionsSetterDict, __pyx_v_stabilization, __pyx_v_shockCapturing, __pyx_v_conservativeFluxDict, __pyx_v_numericalFluxType, __pyx_v_TimeIntegrationClass, __pyx_v_massLumping, __pyx_v_reactionLumping, __pyx_v_options, __pyx_v_name, __pyx_v_reuse_trial_and_test_quadrature, __pyx_v_sd, __pyx_v_movingDomain);
10730 
10731  /* "ADR.pyx":571
10732  * """
10733  * nCalls=0
10734  * def __init__(self, # <<<<<<<<<<<<<<
10735  * uDict,
10736  * phiDict,
10737  */
10738 
10739  /* function exit code */
10740  __Pyx_RefNannyFinishContext();
10741  return __pyx_r;
10742 }
10743 
10744 static PyObject *__pyx_pf_3ADR_10LevelModel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_uDict, PyObject *__pyx_v_phiDict, PyObject *__pyx_v_testSpaceDict, PyObject *__pyx_v_matType, PyObject *__pyx_v_dofBoundaryConditionsDict, PyObject *__pyx_v_dofBoundaryConditionsSetterDict, PyObject *__pyx_v_coefficients, PyObject *__pyx_v_elementQuadrature, PyObject *__pyx_v_elementBoundaryQuadrature, PyObject *__pyx_v_fluxBoundaryConditionsDict, PyObject *__pyx_v_advectiveFluxBoundaryConditionsSetterDict, PyObject *__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, CYTHON_UNUSED PyObject *__pyx_v_stressTraceBoundaryConditionsSetterDict, PyObject *__pyx_v_stabilization, PyObject *__pyx_v_shockCapturing, PyObject *__pyx_v_conservativeFluxDict, PyObject *__pyx_v_numericalFluxType, PyObject *__pyx_v_TimeIntegrationClass, PyObject *__pyx_v_massLumping, PyObject *__pyx_v_reactionLumping, PyObject *__pyx_v_options, PyObject *__pyx_v_name, PyObject *__pyx_v_reuse_trial_and_test_quadrature, PyObject *__pyx_v_sd, PyObject *__pyx_v_movingDomain) {
10745  PyObject *__pyx_v_Comm = NULL;
10746  PyObject *__pyx_v_ci = NULL;
10747  PyObject *__pyx_v_flag = NULL;
10748  PyObject *__pyx_v_diffusionDict = NULL;
10749  PyObject *__pyx_v_elementQuadratureDict = NULL;
10750  int __pyx_v_elemQuadIsDict;
10751  PyObject *__pyx_v_I = NULL;
10752  PyObject *__pyx_v_elementBoundaryQuadratureDict = NULL;
10753  PyObject *__pyx_v_cj = NULL;
10754  PyObject *__pyx_v_ebNE = NULL;
10755  PyObject *__pyx_v_ebN = NULL;
10756  PyObject *__pyx_v_eN_global = NULL;
10757  PyObject *__pyx_v_ebN_element = NULL;
10758  PyObject *__pyx_v_i = NULL;
10759  PyObject *__pyx_v_nI = NULL;
10760  PyObject *__pyx_v_n = NULL;
10761  PyObject *__pyx_v_comm = NULL;
10762  PyObject *__pyx_v_k = NULL;
10763  PyObject *__pyx_v_PostProcessingTools = NULL;
10764  PyObject *__pyx_v_Archiver = NULL;
10765  PyObject *__pyx_v_fbcObject = NULL;
10766  PyObject *__pyx_v_t = NULL;
10767  PyObject *__pyx_v_g = NULL;
10768  PyObject *__pyx_v_ck = NULL;
10769  PyObject *__pyx_v_diffusiveFluxBoundaryConditionsDict = NULL;
10770  long __pyx_v_compKernelFlag;
10771  PyObject *__pyx_v_u_j = NULL;
10772  PyObject *__pyx_v_phi_k = NULL;
10773  PyObject *__pyx_v_femSpace = NULL;
10774  PyObject *__pyx_v_dc = NULL;
10775  PyObject *__pyx_r = NULL;
10776  __Pyx_RefNannyDeclarations
10777  PyObject *__pyx_t_1 = NULL;
10778  PyObject *__pyx_t_2 = NULL;
10779  int __pyx_t_3;
10780  Py_ssize_t __pyx_t_4;
10781  PyObject *(*__pyx_t_5)(PyObject *);
10782  PyObject *__pyx_t_6 = NULL;
10783  PyObject *__pyx_t_7 = NULL;
10784  int __pyx_t_8;
10785  Py_ssize_t __pyx_t_9;
10786  PyObject *(*__pyx_t_10)(PyObject *);
10787  PyObject *__pyx_t_11 = NULL;
10788  Py_ssize_t __pyx_t_12;
10789  PyObject *(*__pyx_t_13)(PyObject *);
10790  int __pyx_t_14;
10791  PyObject *__pyx_t_15 = NULL;
10792  PyObject *(*__pyx_t_16)(PyObject *);
10793  int __pyx_t_17;
10794  int __pyx_t_18;
10795  Py_ssize_t __pyx_t_19;
10796  int __pyx_t_20;
10797  PyObject *__pyx_t_21 = NULL;
10798  PyObject *__pyx_t_22 = NULL;
10799  Py_ssize_t __pyx_t_23;
10800  Py_ssize_t __pyx_t_24;
10801  int __pyx_t_25;
10802  PyObject *__pyx_t_26 = NULL;
10803  __Pyx_RefNannySetupContext("__init__", 0);
10804 
10805  /* "ADR.pyx":597
10806  * sd = True,
10807  * movingDomain=False):#,
10808  * from proteus import Comm # <<<<<<<<<<<<<<
10809  * #
10810  * #set the objects describing the method and boundary conditions
10811  */
10812  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error)
10813  __Pyx_GOTREF(__pyx_t_1);
10814  __Pyx_INCREF(__pyx_n_s_Comm);
10815  __Pyx_GIVEREF(__pyx_n_s_Comm);
10816  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Comm);
10817  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 597, __pyx_L1_error)
10818  __Pyx_GOTREF(__pyx_t_2);
10819  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10820  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 597, __pyx_L1_error)
10821  __Pyx_GOTREF(__pyx_t_1);
10822  __Pyx_INCREF(__pyx_t_1);
10823  __pyx_v_Comm = __pyx_t_1;
10824  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10825  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10826 
10827  /* "ADR.pyx":601
10828  * #set the objects describing the method and boundary conditions
10829  * #
10830  * self.movingDomain=movingDomain # <<<<<<<<<<<<<<
10831  * self.tLast_mesh=None
10832  * #
10833  */
10834  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain, __pyx_v_movingDomain) < 0) __PYX_ERR(1, 601, __pyx_L1_error)
10835 
10836  /* "ADR.pyx":602
10837  * #
10838  * self.movingDomain=movingDomain
10839  * self.tLast_mesh=None # <<<<<<<<<<<<<<
10840  * #
10841  * self.name=name
10842  */
10843  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tLast_mesh, Py_None) < 0) __PYX_ERR(1, 602, __pyx_L1_error)
10844 
10845  /* "ADR.pyx":604
10846  * self.tLast_mesh=None
10847  * #
10848  * self.name=name # <<<<<<<<<<<<<<
10849  * self.sd=sd
10850  * self.Hess=False
10851  */
10852  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(1, 604, __pyx_L1_error)
10853 
10854  /* "ADR.pyx":605
10855  * #
10856  * self.name=name
10857  * self.sd=sd # <<<<<<<<<<<<<<
10858  * self.Hess=False
10859  * self.lowmem=True
10860  */
10861  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sd, __pyx_v_sd) < 0) __PYX_ERR(1, 605, __pyx_L1_error)
10862 
10863  /* "ADR.pyx":606
10864  * self.name=name
10865  * self.sd=sd
10866  * self.Hess=False # <<<<<<<<<<<<<<
10867  * self.lowmem=True
10868  * self.timeTerm=True#allow turning off the time derivative
10869  */
10870  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Hess, Py_False) < 0) __PYX_ERR(1, 606, __pyx_L1_error)
10871 
10872  /* "ADR.pyx":607
10873  * self.sd=sd
10874  * self.Hess=False
10875  * self.lowmem=True # <<<<<<<<<<<<<<
10876  * self.timeTerm=True#allow turning off the time derivative
10877  * #self.lowmem=False
10878  */
10879  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lowmem, Py_True) < 0) __PYX_ERR(1, 607, __pyx_L1_error)
10880 
10881  /* "ADR.pyx":608
10882  * self.Hess=False
10883  * self.lowmem=True
10884  * self.timeTerm=True#allow turning off the time derivative # <<<<<<<<<<<<<<
10885  * #self.lowmem=False
10886  * self.testIsTrial=True
10887  */
10888  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeTerm, Py_True) < 0) __PYX_ERR(1, 608, __pyx_L1_error)
10889 
10890  /* "ADR.pyx":610
10891  * self.timeTerm=True#allow turning off the time derivative
10892  * #self.lowmem=False
10893  * self.testIsTrial=True # <<<<<<<<<<<<<<
10894  * self.phiTrialIsTrial=True
10895  * self.u = uDict
10896  */
10897  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_testIsTrial, Py_True) < 0) __PYX_ERR(1, 610, __pyx_L1_error)
10898 
10899  /* "ADR.pyx":611
10900  * #self.lowmem=False
10901  * self.testIsTrial=True
10902  * self.phiTrialIsTrial=True # <<<<<<<<<<<<<<
10903  * self.u = uDict
10904  * self.ua = {}#analytical solutions
10905  */
10906  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phiTrialIsTrial, Py_True) < 0) __PYX_ERR(1, 611, __pyx_L1_error)
10907 
10908  /* "ADR.pyx":612
10909  * self.testIsTrial=True
10910  * self.phiTrialIsTrial=True
10911  * self.u = uDict # <<<<<<<<<<<<<<
10912  * self.ua = {}#analytical solutions
10913  * self.phi = phiDict
10914  */
10915  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_u, __pyx_v_uDict) < 0) __PYX_ERR(1, 612, __pyx_L1_error)
10916 
10917  /* "ADR.pyx":613
10918  * self.phiTrialIsTrial=True
10919  * self.u = uDict
10920  * self.ua = {}#analytical solutions # <<<<<<<<<<<<<<
10921  * self.phi = phiDict
10922  * self.dphi={}
10923  */
10924  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 613, __pyx_L1_error)
10925  __Pyx_GOTREF(__pyx_t_2);
10926  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ua, __pyx_t_2) < 0) __PYX_ERR(1, 613, __pyx_L1_error)
10927  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10928 
10929  /* "ADR.pyx":614
10930  * self.u = uDict
10931  * self.ua = {}#analytical solutions
10932  * self.phi = phiDict # <<<<<<<<<<<<<<
10933  * self.dphi={}
10934  * self.matType = matType
10935  */
10936  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phi, __pyx_v_phiDict) < 0) __PYX_ERR(1, 614, __pyx_L1_error)
10937 
10938  /* "ADR.pyx":615
10939  * self.ua = {}#analytical solutions
10940  * self.phi = phiDict
10941  * self.dphi={} # <<<<<<<<<<<<<<
10942  * self.matType = matType
10943  * #mwf try to reuse test and trial information across components if spaces are the same
10944  */
10945  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 615, __pyx_L1_error)
10946  __Pyx_GOTREF(__pyx_t_2);
10947  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dphi, __pyx_t_2) < 0) __PYX_ERR(1, 615, __pyx_L1_error)
10948  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10949 
10950  /* "ADR.pyx":616
10951  * self.phi = phiDict
10952  * self.dphi={}
10953  * self.matType = matType # <<<<<<<<<<<<<<
10954  * #mwf try to reuse test and trial information across components if spaces are the same
10955  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10956  */
10957  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_matType, __pyx_v_matType) < 0) __PYX_ERR(1, 616, __pyx_L1_error)
10958 
10959  /* "ADR.pyx":618
10960  * self.matType = matType
10961  * #mwf try to reuse test and trial information across components if spaces are the same
10962  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False # <<<<<<<<<<<<<<
10963  * if self.reuse_test_trial_quadrature:
10964  * for ci in range(1,coefficients.nc):
10965  */
10966  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reuse_test_trial_quadrature, __pyx_v_reuse_trial_and_test_quadrature) < 0) __PYX_ERR(1, 618, __pyx_L1_error)
10967 
10968  /* "ADR.pyx":619
10969  * #mwf try to reuse test and trial information across components if spaces are the same
10970  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10971  * if self.reuse_test_trial_quadrature: # <<<<<<<<<<<<<<
10972  * for ci in range(1,coefficients.nc):
10973  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10974  */
10975  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reuse_test_trial_quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 619, __pyx_L1_error)
10976  __Pyx_GOTREF(__pyx_t_2);
10977  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 619, __pyx_L1_error)
10978  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10979  if (__pyx_t_3) {
10980 
10981  /* "ADR.pyx":620
10982  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
10983  * if self.reuse_test_trial_quadrature:
10984  * for ci in range(1,coefficients.nc): # <<<<<<<<<<<<<<
10985  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
10986  * ## Simplicial Mesh
10987  */
10988  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_nc); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 620, __pyx_L1_error)
10989  __Pyx_GOTREF(__pyx_t_2);
10990  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 620, __pyx_L1_error)
10991  __Pyx_GOTREF(__pyx_t_1);
10992  __Pyx_INCREF(__pyx_int_1);
10993  __Pyx_GIVEREF(__pyx_int_1);
10994  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_1);
10995  __Pyx_GIVEREF(__pyx_t_2);
10996  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
10997  __pyx_t_2 = 0;
10998  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 620, __pyx_L1_error)
10999  __Pyx_GOTREF(__pyx_t_2);
11000  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11001  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
11002  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
11003  __pyx_t_5 = NULL;
11004  } else {
11005  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 620, __pyx_L1_error)
11006  __Pyx_GOTREF(__pyx_t_1);
11007  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 620, __pyx_L1_error)
11008  }
11009  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11010  for (;;) {
11011  if (likely(!__pyx_t_5)) {
11012  if (likely(PyList_CheckExact(__pyx_t_1))) {
11013  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
11014  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11015  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 620, __pyx_L1_error)
11016  #else
11017  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 620, __pyx_L1_error)
11018  __Pyx_GOTREF(__pyx_t_2);
11019  #endif
11020  } else {
11021  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
11022  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11023  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 620, __pyx_L1_error)
11024  #else
11025  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 620, __pyx_L1_error)
11026  __Pyx_GOTREF(__pyx_t_2);
11027  #endif
11028  }
11029  } else {
11030  __pyx_t_2 = __pyx_t_5(__pyx_t_1);
11031  if (unlikely(!__pyx_t_2)) {
11032  PyObject* exc_type = PyErr_Occurred();
11033  if (exc_type) {
11034  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11035  else __PYX_ERR(1, 620, __pyx_L1_error)
11036  }
11037  break;
11038  }
11039  __Pyx_GOTREF(__pyx_t_2);
11040  }
11041  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
11042  __pyx_t_2 = 0;
11043 
11044  /* "ADR.pyx":621
11045  * if self.reuse_test_trial_quadrature:
11046  * for ci in range(1,coefficients.nc):
11047  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!" # <<<<<<<<<<<<<<
11048  * ## Simplicial Mesh
11049  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
11050  */
11051  #ifndef CYTHON_WITHOUT_ASSERTIONS
11052  if (unlikely(!Py_OptimizeFlag)) {
11053  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
11054  __Pyx_GOTREF(__pyx_t_2);
11055  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 621, __pyx_L1_error)
11056  __Pyx_GOTREF(__pyx_t_6);
11057  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11058  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
11059  __Pyx_GOTREF(__pyx_t_2);
11060  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11061  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 621, __pyx_L1_error)
11062  __Pyx_GOTREF(__pyx_t_6);
11063  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11064  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
11065  __Pyx_GOTREF(__pyx_t_2);
11066  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11067  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 621, __pyx_L1_error)
11068  __Pyx_GOTREF(__pyx_t_6);
11069  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 621, __pyx_L1_error)
11070  __Pyx_GOTREF(__pyx_t_7);
11071  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11072  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 621, __pyx_L1_error)
11073  __Pyx_GOTREF(__pyx_t_6);
11074  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11075  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 621, __pyx_L1_error)
11076  __Pyx_GOTREF(__pyx_t_7);
11077  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11078  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 621, __pyx_L1_error)
11079  __Pyx_GOTREF(__pyx_t_6);
11080  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11081  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 621, __pyx_L1_error)
11082  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11083  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11084  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 621, __pyx_L1_error)
11085  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11086  if (unlikely(!__pyx_t_3)) {
11087  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_to_reuse_test_trial_quad_all_fem);
11088  __PYX_ERR(1, 621, __pyx_L1_error)
11089  }
11090  }
11091  #endif
11092 
11093  /* "ADR.pyx":620
11094  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
11095  * if self.reuse_test_trial_quadrature:
11096  * for ci in range(1,coefficients.nc): # <<<<<<<<<<<<<<
11097  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
11098  * ## Simplicial Mesh
11099  */
11100  }
11101  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11102 
11103  /* "ADR.pyx":619
11104  * #mwf try to reuse test and trial information across components if spaces are the same
11105  * self.reuse_test_trial_quadrature = reuse_trial_and_test_quadrature#True#False
11106  * if self.reuse_test_trial_quadrature: # <<<<<<<<<<<<<<
11107  * for ci in range(1,coefficients.nc):
11108  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
11109  */
11110  }
11111 
11112  /* "ADR.pyx":623
11113  * assert self.u[ci].femSpace.__class__.__name__ == self.u[0].femSpace.__class__.__name__, "to reuse_test_trial_quad all femSpaces must be the same!"
11114  * ## Simplicial Mesh
11115  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now # <<<<<<<<<<<<<<
11116  * self.testSpace = testSpaceDict
11117  * self.dirichletConditions = dofBoundaryConditionsDict
11118  */
11119  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 623, __pyx_L1_error)
11120  __Pyx_GOTREF(__pyx_t_1);
11121  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 623, __pyx_L1_error)
11122  __Pyx_GOTREF(__pyx_t_7);
11123  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11124  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 623, __pyx_L1_error)
11125  __Pyx_GOTREF(__pyx_t_1);
11126  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11127  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 623, __pyx_L1_error)
11128  __Pyx_GOTREF(__pyx_t_7);
11129  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11130  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mesh, __pyx_t_7) < 0) __PYX_ERR(1, 623, __pyx_L1_error)
11131  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11132 
11133  /* "ADR.pyx":624
11134  * ## Simplicial Mesh
11135  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
11136  * self.testSpace = testSpaceDict # <<<<<<<<<<<<<<
11137  * self.dirichletConditions = dofBoundaryConditionsDict
11138  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
11139  */
11140  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_testSpace, __pyx_v_testSpaceDict) < 0) __PYX_ERR(1, 624, __pyx_L1_error)
11141 
11142  /* "ADR.pyx":625
11143  * self.mesh = self.u[0].femSpace.mesh #assume the same mesh for all components for now
11144  * self.testSpace = testSpaceDict
11145  * self.dirichletConditions = dofBoundaryConditionsDict # <<<<<<<<<<<<<<
11146  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
11147  * self.coefficients = coefficients
11148  */
11149  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditions, __pyx_v_dofBoundaryConditionsDict) < 0) __PYX_ERR(1, 625, __pyx_L1_error)
11150 
11151  /* "ADR.pyx":626
11152  * self.testSpace = testSpaceDict
11153  * self.dirichletConditions = dofBoundaryConditionsDict
11154  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints # <<<<<<<<<<<<<<
11155  * self.coefficients = coefficients
11156  * self.coefficients.initializeMesh(self.mesh)
11157  */
11158  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletNodeSetList, Py_None) < 0) __PYX_ERR(1, 626, __pyx_L1_error)
11159 
11160  /* "ADR.pyx":627
11161  * self.dirichletConditions = dofBoundaryConditionsDict
11162  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
11163  * self.coefficients = coefficients # <<<<<<<<<<<<<<
11164  * self.coefficients.initializeMesh(self.mesh)
11165  * self.nc = self.coefficients.nc
11166  */
11167  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_coefficients, __pyx_v_coefficients) < 0) __PYX_ERR(1, 627, __pyx_L1_error)
11168 
11169  /* "ADR.pyx":628
11170  * self.dirichletNodeSetList=None #explicit Dirichlet conditions for now, no Dirichlet BC constraints
11171  * self.coefficients = coefficients
11172  * self.coefficients.initializeMesh(self.mesh) # <<<<<<<<<<<<<<
11173  * self.nc = self.coefficients.nc
11174  * self.stabilization = stabilization
11175  */
11176  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 628, __pyx_L1_error)
11177  __Pyx_GOTREF(__pyx_t_1);
11178  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_initializeMesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 628, __pyx_L1_error)
11179  __Pyx_GOTREF(__pyx_t_6);
11180  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11181  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 628, __pyx_L1_error)
11182  __Pyx_GOTREF(__pyx_t_1);
11183  __pyx_t_2 = NULL;
11184  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
11185  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
11186  if (likely(__pyx_t_2)) {
11187  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11188  __Pyx_INCREF(__pyx_t_2);
11189  __Pyx_INCREF(function);
11190  __Pyx_DECREF_SET(__pyx_t_6, function);
11191  }
11192  }
11193  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1);
11194  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11195  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11196  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 628, __pyx_L1_error)
11197  __Pyx_GOTREF(__pyx_t_7);
11198  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11199  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11200 
11201  /* "ADR.pyx":629
11202  * self.coefficients = coefficients
11203  * self.coefficients.initializeMesh(self.mesh)
11204  * self.nc = self.coefficients.nc # <<<<<<<<<<<<<<
11205  * self.stabilization = stabilization
11206  * self.shockCapturing = shockCapturing
11207  */
11208  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 629, __pyx_L1_error)
11209  __Pyx_GOTREF(__pyx_t_7);
11210  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 629, __pyx_L1_error)
11211  __Pyx_GOTREF(__pyx_t_6);
11212  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11213  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nc, __pyx_t_6) < 0) __PYX_ERR(1, 629, __pyx_L1_error)
11214  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11215 
11216  /* "ADR.pyx":630
11217  * self.coefficients.initializeMesh(self.mesh)
11218  * self.nc = self.coefficients.nc
11219  * self.stabilization = stabilization # <<<<<<<<<<<<<<
11220  * self.shockCapturing = shockCapturing
11221  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11222  */
11223  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilization, __pyx_v_stabilization) < 0) __PYX_ERR(1, 630, __pyx_L1_error)
11224 
11225  /* "ADR.pyx":631
11226  * self.nc = self.coefficients.nc
11227  * self.stabilization = stabilization
11228  * self.shockCapturing = shockCapturing # <<<<<<<<<<<<<<
11229  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11230  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11231  */
11232  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing, __pyx_v_shockCapturing) < 0) __PYX_ERR(1, 631, __pyx_L1_error)
11233 
11234  /* "ADR.pyx":632
11235  * self.stabilization = stabilization
11236  * self.shockCapturing = shockCapturing
11237  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now # <<<<<<<<<<<<<<
11238  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11239  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11240  */
11241  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_conservativeFlux, __pyx_v_conservativeFluxDict) < 0) __PYX_ERR(1, 632, __pyx_L1_error)
11242 
11243  /* "ADR.pyx":633
11244  * self.shockCapturing = shockCapturing
11245  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11246  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict # <<<<<<<<<<<<<<
11247  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11248  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11249  */
11250  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions, __pyx_v_fluxBoundaryConditionsDict) < 0) __PYX_ERR(1, 633, __pyx_L1_error)
11251 
11252  /* "ADR.pyx":634
11253  * self.conservativeFlux = conservativeFluxDict #no velocity post-processing for now
11254  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11255  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict # <<<<<<<<<<<<<<
11256  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11257  * #determine whether the stabilization term is nonlinear
11258  */
11259  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_v_advectiveFluxBoundaryConditionsSetterDict) < 0) __PYX_ERR(1, 634, __pyx_L1_error)
11260 
11261  /* "ADR.pyx":635
11262  * self.fluxBoundaryConditions=fluxBoundaryConditionsDict
11263  * self.advectiveFluxBoundaryConditionsSetterDict=advectiveFluxBoundaryConditionsSetterDict
11264  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict # <<<<<<<<<<<<<<
11265  * #determine whether the stabilization term is nonlinear
11266  * self.stabilizationIsNonlinear = False
11267  */
11268  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict) < 0) __PYX_ERR(1, 635, __pyx_L1_error)
11269 
11270  /* "ADR.pyx":637
11271  * self.diffusiveFluxBoundaryConditionsSetterDictDict = diffusiveFluxBoundaryConditionsSetterDictDict
11272  * #determine whether the stabilization term is nonlinear
11273  * self.stabilizationIsNonlinear = False # <<<<<<<<<<<<<<
11274  * #cek come back
11275  * if self.stabilization is not None:
11276  */
11277  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_False) < 0) __PYX_ERR(1, 637, __pyx_L1_error)
11278 
11279  /* "ADR.pyx":639
11280  * self.stabilizationIsNonlinear = False
11281  * #cek come back
11282  * if self.stabilization is not None: # <<<<<<<<<<<<<<
11283  * for ci in range(self.nc):
11284  * if coefficients.mass.has_key(ci):
11285  */
11286  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 639, __pyx_L1_error)
11287  __Pyx_GOTREF(__pyx_t_6);
11288  __pyx_t_3 = (__pyx_t_6 != Py_None);
11289  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11290  __pyx_t_8 = (__pyx_t_3 != 0);
11291  if (__pyx_t_8) {
11292 
11293  /* "ADR.pyx":640
11294  * #cek come back
11295  * if self.stabilization is not None:
11296  * for ci in range(self.nc): # <<<<<<<<<<<<<<
11297  * if coefficients.mass.has_key(ci):
11298  * for flag in coefficients.mass[ci].values():
11299  */
11300  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 640, __pyx_L1_error)
11301  __Pyx_GOTREF(__pyx_t_6);
11302  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 640, __pyx_L1_error)
11303  __Pyx_GOTREF(__pyx_t_7);
11304  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11305  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
11306  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
11307  __pyx_t_5 = NULL;
11308  } else {
11309  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 640, __pyx_L1_error)
11310  __Pyx_GOTREF(__pyx_t_6);
11311  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 640, __pyx_L1_error)
11312  }
11313  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11314  for (;;) {
11315  if (likely(!__pyx_t_5)) {
11316  if (likely(PyList_CheckExact(__pyx_t_6))) {
11317  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
11318  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11319  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 640, __pyx_L1_error)
11320  #else
11321  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 640, __pyx_L1_error)
11322  __Pyx_GOTREF(__pyx_t_7);
11323  #endif
11324  } else {
11325  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
11326  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11327  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 640, __pyx_L1_error)
11328  #else
11329  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 640, __pyx_L1_error)
11330  __Pyx_GOTREF(__pyx_t_7);
11331  #endif
11332  }
11333  } else {
11334  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
11335  if (unlikely(!__pyx_t_7)) {
11336  PyObject* exc_type = PyErr_Occurred();
11337  if (exc_type) {
11338  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11339  else __PYX_ERR(1, 640, __pyx_L1_error)
11340  }
11341  break;
11342  }
11343  __Pyx_GOTREF(__pyx_t_7);
11344  }
11345  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
11346  __pyx_t_7 = 0;
11347 
11348  /* "ADR.pyx":641
11349  * if self.stabilization is not None:
11350  * for ci in range(self.nc):
11351  * if coefficients.mass.has_key(ci): # <<<<<<<<<<<<<<
11352  * for flag in coefficients.mass[ci].values():
11353  * if flag == 'nonlinear':
11354  */
11355  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_mass); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 641, __pyx_L1_error)
11356  __Pyx_GOTREF(__pyx_t_1);
11357  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 641, __pyx_L1_error)
11358  __Pyx_GOTREF(__pyx_t_2);
11359  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11360  __pyx_t_1 = NULL;
11361  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11362  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
11363  if (likely(__pyx_t_1)) {
11364  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11365  __Pyx_INCREF(__pyx_t_1);
11366  __Pyx_INCREF(function);
11367  __Pyx_DECREF_SET(__pyx_t_2, function);
11368  }
11369  }
11370  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_ci) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci);
11371  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11372  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 641, __pyx_L1_error)
11373  __Pyx_GOTREF(__pyx_t_7);
11374  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11375  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 641, __pyx_L1_error)
11376  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11377  if (__pyx_t_8) {
11378 
11379  /* "ADR.pyx":642
11380  * for ci in range(self.nc):
11381  * if coefficients.mass.has_key(ci):
11382  * for flag in coefficients.mass[ci].values(): # <<<<<<<<<<<<<<
11383  * if flag == 'nonlinear':
11384  * self.stabilizationIsNonlinear=True
11385  */
11386  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_mass); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 642, __pyx_L1_error)
11387  __Pyx_GOTREF(__pyx_t_2);
11388  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 642, __pyx_L1_error)
11389  __Pyx_GOTREF(__pyx_t_1);
11390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11391  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 642, __pyx_L1_error)
11392  __Pyx_GOTREF(__pyx_t_2);
11393  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11394  __pyx_t_1 = NULL;
11395  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11396  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
11397  if (likely(__pyx_t_1)) {
11398  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11399  __Pyx_INCREF(__pyx_t_1);
11400  __Pyx_INCREF(function);
11401  __Pyx_DECREF_SET(__pyx_t_2, function);
11402  }
11403  }
11404  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
11405  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11406  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 642, __pyx_L1_error)
11407  __Pyx_GOTREF(__pyx_t_7);
11408  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11409  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
11410  __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
11411  __pyx_t_10 = NULL;
11412  } else {
11413  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 642, __pyx_L1_error)
11414  __Pyx_GOTREF(__pyx_t_2);
11415  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 642, __pyx_L1_error)
11416  }
11417  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11418  for (;;) {
11419  if (likely(!__pyx_t_10)) {
11420  if (likely(PyList_CheckExact(__pyx_t_2))) {
11421  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
11422  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11423  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 642, __pyx_L1_error)
11424  #else
11425  __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 642, __pyx_L1_error)
11426  __Pyx_GOTREF(__pyx_t_7);
11427  #endif
11428  } else {
11429  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11430  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11431  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 642, __pyx_L1_error)
11432  #else
11433  __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 642, __pyx_L1_error)
11434  __Pyx_GOTREF(__pyx_t_7);
11435  #endif
11436  }
11437  } else {
11438  __pyx_t_7 = __pyx_t_10(__pyx_t_2);
11439  if (unlikely(!__pyx_t_7)) {
11440  PyObject* exc_type = PyErr_Occurred();
11441  if (exc_type) {
11442  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11443  else __PYX_ERR(1, 642, __pyx_L1_error)
11444  }
11445  break;
11446  }
11447  __Pyx_GOTREF(__pyx_t_7);
11448  }
11449  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_7);
11450  __pyx_t_7 = 0;
11451 
11452  /* "ADR.pyx":643
11453  * if coefficients.mass.has_key(ci):
11454  * for flag in coefficients.mass[ci].values():
11455  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11456  * self.stabilizationIsNonlinear=True
11457  * if coefficients.advection.has_key(ci):
11458  */
11459  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 643, __pyx_L1_error)
11460  if (__pyx_t_8) {
11461 
11462  /* "ADR.pyx":644
11463  * for flag in coefficients.mass[ci].values():
11464  * if flag == 'nonlinear':
11465  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11466  * if coefficients.advection.has_key(ci):
11467  * for flag in coefficients.advection[ci].values():
11468  */
11469  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(1, 644, __pyx_L1_error)
11470 
11471  /* "ADR.pyx":643
11472  * if coefficients.mass.has_key(ci):
11473  * for flag in coefficients.mass[ci].values():
11474  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11475  * self.stabilizationIsNonlinear=True
11476  * if coefficients.advection.has_key(ci):
11477  */
11478  }
11479 
11480  /* "ADR.pyx":642
11481  * for ci in range(self.nc):
11482  * if coefficients.mass.has_key(ci):
11483  * for flag in coefficients.mass[ci].values(): # <<<<<<<<<<<<<<
11484  * if flag == 'nonlinear':
11485  * self.stabilizationIsNonlinear=True
11486  */
11487  }
11488  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11489 
11490  /* "ADR.pyx":641
11491  * if self.stabilization is not None:
11492  * for ci in range(self.nc):
11493  * if coefficients.mass.has_key(ci): # <<<<<<<<<<<<<<
11494  * for flag in coefficients.mass[ci].values():
11495  * if flag == 'nonlinear':
11496  */
11497  }
11498 
11499  /* "ADR.pyx":645
11500  * if flag == 'nonlinear':
11501  * self.stabilizationIsNonlinear=True
11502  * if coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
11503  * for flag in coefficients.advection[ci].values():
11504  * if flag == 'nonlinear':
11505  */
11506  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_advection); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 645, __pyx_L1_error)
11507  __Pyx_GOTREF(__pyx_t_7);
11508  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_has_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 645, __pyx_L1_error)
11509  __Pyx_GOTREF(__pyx_t_1);
11510  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11511  __pyx_t_7 = NULL;
11512  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11513  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
11514  if (likely(__pyx_t_7)) {
11515  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11516  __Pyx_INCREF(__pyx_t_7);
11517  __Pyx_INCREF(function);
11518  __Pyx_DECREF_SET(__pyx_t_1, function);
11519  }
11520  }
11521  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_v_ci) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_ci);
11522  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11523  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 645, __pyx_L1_error)
11524  __Pyx_GOTREF(__pyx_t_2);
11525  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11526  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 645, __pyx_L1_error)
11527  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11528  if (__pyx_t_8) {
11529 
11530  /* "ADR.pyx":646
11531  * self.stabilizationIsNonlinear=True
11532  * if coefficients.advection.has_key(ci):
11533  * for flag in coefficients.advection[ci].values(): # <<<<<<<<<<<<<<
11534  * if flag == 'nonlinear':
11535  * self.stabilizationIsNonlinear=True
11536  */
11537  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_advection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 646, __pyx_L1_error)
11538  __Pyx_GOTREF(__pyx_t_1);
11539  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 646, __pyx_L1_error)
11540  __Pyx_GOTREF(__pyx_t_7);
11541  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11542  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 646, __pyx_L1_error)
11543  __Pyx_GOTREF(__pyx_t_1);
11544  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11545  __pyx_t_7 = NULL;
11546  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11547  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
11548  if (likely(__pyx_t_7)) {
11549  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11550  __Pyx_INCREF(__pyx_t_7);
11551  __Pyx_INCREF(function);
11552  __Pyx_DECREF_SET(__pyx_t_1, function);
11553  }
11554  }
11555  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
11556  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11557  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
11558  __Pyx_GOTREF(__pyx_t_2);
11559  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11560  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
11561  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
11562  __pyx_t_10 = NULL;
11563  } else {
11564  __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 646, __pyx_L1_error)
11565  __Pyx_GOTREF(__pyx_t_1);
11566  __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 646, __pyx_L1_error)
11567  }
11568  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11569  for (;;) {
11570  if (likely(!__pyx_t_10)) {
11571  if (likely(PyList_CheckExact(__pyx_t_1))) {
11572  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
11573  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11574  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 646, __pyx_L1_error)
11575  #else
11576  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
11577  __Pyx_GOTREF(__pyx_t_2);
11578  #endif
11579  } else {
11580  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
11581  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11582  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 646, __pyx_L1_error)
11583  #else
11584  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
11585  __Pyx_GOTREF(__pyx_t_2);
11586  #endif
11587  }
11588  } else {
11589  __pyx_t_2 = __pyx_t_10(__pyx_t_1);
11590  if (unlikely(!__pyx_t_2)) {
11591  PyObject* exc_type = PyErr_Occurred();
11592  if (exc_type) {
11593  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11594  else __PYX_ERR(1, 646, __pyx_L1_error)
11595  }
11596  break;
11597  }
11598  __Pyx_GOTREF(__pyx_t_2);
11599  }
11600  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
11601  __pyx_t_2 = 0;
11602 
11603  /* "ADR.pyx":647
11604  * if coefficients.advection.has_key(ci):
11605  * for flag in coefficients.advection[ci].values():
11606  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11607  * self.stabilizationIsNonlinear=True
11608  * if coefficients.diffusion.has_key(ci):
11609  */
11610  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 647, __pyx_L1_error)
11611  if (__pyx_t_8) {
11612 
11613  /* "ADR.pyx":648
11614  * for flag in coefficients.advection[ci].values():
11615  * if flag == 'nonlinear':
11616  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11617  * if coefficients.diffusion.has_key(ci):
11618  * for diffusionDict in coefficients.diffusion[ci].values():
11619  */
11620  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(1, 648, __pyx_L1_error)
11621 
11622  /* "ADR.pyx":647
11623  * if coefficients.advection.has_key(ci):
11624  * for flag in coefficients.advection[ci].values():
11625  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11626  * self.stabilizationIsNonlinear=True
11627  * if coefficients.diffusion.has_key(ci):
11628  */
11629  }
11630 
11631  /* "ADR.pyx":646
11632  * self.stabilizationIsNonlinear=True
11633  * if coefficients.advection.has_key(ci):
11634  * for flag in coefficients.advection[ci].values(): # <<<<<<<<<<<<<<
11635  * if flag == 'nonlinear':
11636  * self.stabilizationIsNonlinear=True
11637  */
11638  }
11639  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11640 
11641  /* "ADR.pyx":645
11642  * if flag == 'nonlinear':
11643  * self.stabilizationIsNonlinear=True
11644  * if coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
11645  * for flag in coefficients.advection[ci].values():
11646  * if flag == 'nonlinear':
11647  */
11648  }
11649 
11650  /* "ADR.pyx":649
11651  * if flag == 'nonlinear':
11652  * self.stabilizationIsNonlinear=True
11653  * if coefficients.diffusion.has_key(ci): # <<<<<<<<<<<<<<
11654  * for diffusionDict in coefficients.diffusion[ci].values():
11655  * for flag in diffusionDict.values():
11656  */
11657  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_diffusion); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 649, __pyx_L1_error)
11658  __Pyx_GOTREF(__pyx_t_2);
11659  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 649, __pyx_L1_error)
11660  __Pyx_GOTREF(__pyx_t_7);
11661  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11662  __pyx_t_2 = NULL;
11663  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
11664  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
11665  if (likely(__pyx_t_2)) {
11666  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
11667  __Pyx_INCREF(__pyx_t_2);
11668  __Pyx_INCREF(function);
11669  __Pyx_DECREF_SET(__pyx_t_7, function);
11670  }
11671  }
11672  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_v_ci) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_ci);
11673  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11674  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 649, __pyx_L1_error)
11675  __Pyx_GOTREF(__pyx_t_1);
11676  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11677  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 649, __pyx_L1_error)
11678  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11679  if (__pyx_t_8) {
11680 
11681  /* "ADR.pyx":650
11682  * self.stabilizationIsNonlinear=True
11683  * if coefficients.diffusion.has_key(ci):
11684  * for diffusionDict in coefficients.diffusion[ci].values(): # <<<<<<<<<<<<<<
11685  * for flag in diffusionDict.values():
11686  * if flag != 'constant':
11687  */
11688  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_diffusion); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 650, __pyx_L1_error)
11689  __Pyx_GOTREF(__pyx_t_7);
11690  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 650, __pyx_L1_error)
11691  __Pyx_GOTREF(__pyx_t_2);
11692  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11693  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 650, __pyx_L1_error)
11694  __Pyx_GOTREF(__pyx_t_7);
11695  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11696  __pyx_t_2 = NULL;
11697  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
11698  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
11699  if (likely(__pyx_t_2)) {
11700  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
11701  __Pyx_INCREF(__pyx_t_2);
11702  __Pyx_INCREF(function);
11703  __Pyx_DECREF_SET(__pyx_t_7, function);
11704  }
11705  }
11706  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
11707  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11708  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 650, __pyx_L1_error)
11709  __Pyx_GOTREF(__pyx_t_1);
11710  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11711  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
11712  __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
11713  __pyx_t_10 = NULL;
11714  } else {
11715  __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 650, __pyx_L1_error)
11716  __Pyx_GOTREF(__pyx_t_7);
11717  __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 650, __pyx_L1_error)
11718  }
11719  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11720  for (;;) {
11721  if (likely(!__pyx_t_10)) {
11722  if (likely(PyList_CheckExact(__pyx_t_7))) {
11723  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
11724  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11725  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 650, __pyx_L1_error)
11726  #else
11727  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 650, __pyx_L1_error)
11728  __Pyx_GOTREF(__pyx_t_1);
11729  #endif
11730  } else {
11731  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
11732  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11733  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 650, __pyx_L1_error)
11734  #else
11735  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 650, __pyx_L1_error)
11736  __Pyx_GOTREF(__pyx_t_1);
11737  #endif
11738  }
11739  } else {
11740  __pyx_t_1 = __pyx_t_10(__pyx_t_7);
11741  if (unlikely(!__pyx_t_1)) {
11742  PyObject* exc_type = PyErr_Occurred();
11743  if (exc_type) {
11744  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11745  else __PYX_ERR(1, 650, __pyx_L1_error)
11746  }
11747  break;
11748  }
11749  __Pyx_GOTREF(__pyx_t_1);
11750  }
11751  __Pyx_XDECREF_SET(__pyx_v_diffusionDict, __pyx_t_1);
11752  __pyx_t_1 = 0;
11753 
11754  /* "ADR.pyx":651
11755  * if coefficients.diffusion.has_key(ci):
11756  * for diffusionDict in coefficients.diffusion[ci].values():
11757  * for flag in diffusionDict.values(): # <<<<<<<<<<<<<<
11758  * if flag != 'constant':
11759  * self.stabilizationIsNonlinear=True
11760  */
11761  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_diffusionDict, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 651, __pyx_L1_error)
11762  __Pyx_GOTREF(__pyx_t_2);
11763  __pyx_t_11 = NULL;
11764  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11765  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
11766  if (likely(__pyx_t_11)) {
11767  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11768  __Pyx_INCREF(__pyx_t_11);
11769  __Pyx_INCREF(function);
11770  __Pyx_DECREF_SET(__pyx_t_2, function);
11771  }
11772  }
11773  __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
11774  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
11775  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 651, __pyx_L1_error)
11776  __Pyx_GOTREF(__pyx_t_1);
11777  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11778  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
11779  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_12 = 0;
11780  __pyx_t_13 = NULL;
11781  } else {
11782  __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 651, __pyx_L1_error)
11783  __Pyx_GOTREF(__pyx_t_2);
11784  __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 651, __pyx_L1_error)
11785  }
11786  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11787  for (;;) {
11788  if (likely(!__pyx_t_13)) {
11789  if (likely(PyList_CheckExact(__pyx_t_2))) {
11790  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_2)) break;
11791  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11792  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 651, __pyx_L1_error)
11793  #else
11794  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 651, __pyx_L1_error)
11795  __Pyx_GOTREF(__pyx_t_1);
11796  #endif
11797  } else {
11798  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11799  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11800  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(1, 651, __pyx_L1_error)
11801  #else
11802  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 651, __pyx_L1_error)
11803  __Pyx_GOTREF(__pyx_t_1);
11804  #endif
11805  }
11806  } else {
11807  __pyx_t_1 = __pyx_t_13(__pyx_t_2);
11808  if (unlikely(!__pyx_t_1)) {
11809  PyObject* exc_type = PyErr_Occurred();
11810  if (exc_type) {
11811  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11812  else __PYX_ERR(1, 651, __pyx_L1_error)
11813  }
11814  break;
11815  }
11816  __Pyx_GOTREF(__pyx_t_1);
11817  }
11818  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_1);
11819  __pyx_t_1 = 0;
11820 
11821  /* "ADR.pyx":652
11822  * for diffusionDict in coefficients.diffusion[ci].values():
11823  * for flag in diffusionDict.values():
11824  * if flag != 'constant': # <<<<<<<<<<<<<<
11825  * self.stabilizationIsNonlinear=True
11826  * if coefficients.potential.has_key(ci):
11827  */
11828  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_constant, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 652, __pyx_L1_error)
11829  if (__pyx_t_8) {
11830 
11831  /* "ADR.pyx":653
11832  * for flag in diffusionDict.values():
11833  * if flag != 'constant':
11834  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11835  * if coefficients.potential.has_key(ci):
11836  * for flag in coefficients.potential[ci].values():
11837  */
11838  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(1, 653, __pyx_L1_error)
11839 
11840  /* "ADR.pyx":652
11841  * for diffusionDict in coefficients.diffusion[ci].values():
11842  * for flag in diffusionDict.values():
11843  * if flag != 'constant': # <<<<<<<<<<<<<<
11844  * self.stabilizationIsNonlinear=True
11845  * if coefficients.potential.has_key(ci):
11846  */
11847  }
11848 
11849  /* "ADR.pyx":651
11850  * if coefficients.diffusion.has_key(ci):
11851  * for diffusionDict in coefficients.diffusion[ci].values():
11852  * for flag in diffusionDict.values(): # <<<<<<<<<<<<<<
11853  * if flag != 'constant':
11854  * self.stabilizationIsNonlinear=True
11855  */
11856  }
11857  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11858 
11859  /* "ADR.pyx":650
11860  * self.stabilizationIsNonlinear=True
11861  * if coefficients.diffusion.has_key(ci):
11862  * for diffusionDict in coefficients.diffusion[ci].values(): # <<<<<<<<<<<<<<
11863  * for flag in diffusionDict.values():
11864  * if flag != 'constant':
11865  */
11866  }
11867  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11868 
11869  /* "ADR.pyx":649
11870  * if flag == 'nonlinear':
11871  * self.stabilizationIsNonlinear=True
11872  * if coefficients.diffusion.has_key(ci): # <<<<<<<<<<<<<<
11873  * for diffusionDict in coefficients.diffusion[ci].values():
11874  * for flag in diffusionDict.values():
11875  */
11876  }
11877 
11878  /* "ADR.pyx":654
11879  * if flag != 'constant':
11880  * self.stabilizationIsNonlinear=True
11881  * if coefficients.potential.has_key(ci): # <<<<<<<<<<<<<<
11882  * for flag in coefficients.potential[ci].values():
11883  * if flag == 'nonlinear':
11884  */
11885  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_potential); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 654, __pyx_L1_error)
11886  __Pyx_GOTREF(__pyx_t_2);
11887  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_has_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 654, __pyx_L1_error)
11888  __Pyx_GOTREF(__pyx_t_1);
11889  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11890  __pyx_t_2 = NULL;
11891  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11892  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
11893  if (likely(__pyx_t_2)) {
11894  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11895  __Pyx_INCREF(__pyx_t_2);
11896  __Pyx_INCREF(function);
11897  __Pyx_DECREF_SET(__pyx_t_1, function);
11898  }
11899  }
11900  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_ci) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_ci);
11901  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11902  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 654, __pyx_L1_error)
11903  __Pyx_GOTREF(__pyx_t_7);
11904  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11905  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 654, __pyx_L1_error)
11906  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11907  if (__pyx_t_8) {
11908 
11909  /* "ADR.pyx":655
11910  * self.stabilizationIsNonlinear=True
11911  * if coefficients.potential.has_key(ci):
11912  * for flag in coefficients.potential[ci].values(): # <<<<<<<<<<<<<<
11913  * if flag == 'nonlinear':
11914  * self.stabilizationIsNonlinear=True
11915  */
11916  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_potential); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 655, __pyx_L1_error)
11917  __Pyx_GOTREF(__pyx_t_1);
11918  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ci); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 655, __pyx_L1_error)
11919  __Pyx_GOTREF(__pyx_t_2);
11920  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11921  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 655, __pyx_L1_error)
11922  __Pyx_GOTREF(__pyx_t_1);
11923  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11924  __pyx_t_2 = NULL;
11925  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
11926  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
11927  if (likely(__pyx_t_2)) {
11928  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
11929  __Pyx_INCREF(__pyx_t_2);
11930  __Pyx_INCREF(function);
11931  __Pyx_DECREF_SET(__pyx_t_1, function);
11932  }
11933  }
11934  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
11935  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11936  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 655, __pyx_L1_error)
11937  __Pyx_GOTREF(__pyx_t_7);
11938  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11939  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
11940  __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
11941  __pyx_t_10 = NULL;
11942  } else {
11943  __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 655, __pyx_L1_error)
11944  __Pyx_GOTREF(__pyx_t_1);
11945  __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 655, __pyx_L1_error)
11946  }
11947  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11948  for (;;) {
11949  if (likely(!__pyx_t_10)) {
11950  if (likely(PyList_CheckExact(__pyx_t_1))) {
11951  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
11952  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11953  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 655, __pyx_L1_error)
11954  #else
11955  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 655, __pyx_L1_error)
11956  __Pyx_GOTREF(__pyx_t_7);
11957  #endif
11958  } else {
11959  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
11960  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11961  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 655, __pyx_L1_error)
11962  #else
11963  __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 655, __pyx_L1_error)
11964  __Pyx_GOTREF(__pyx_t_7);
11965  #endif
11966  }
11967  } else {
11968  __pyx_t_7 = __pyx_t_10(__pyx_t_1);
11969  if (unlikely(!__pyx_t_7)) {
11970  PyObject* exc_type = PyErr_Occurred();
11971  if (exc_type) {
11972  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11973  else __PYX_ERR(1, 655, __pyx_L1_error)
11974  }
11975  break;
11976  }
11977  __Pyx_GOTREF(__pyx_t_7);
11978  }
11979  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_7);
11980  __pyx_t_7 = 0;
11981 
11982  /* "ADR.pyx":656
11983  * if coefficients.potential.has_key(ci):
11984  * for flag in coefficients.potential[ci].values():
11985  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
11986  * self.stabilizationIsNonlinear=True
11987  * if coefficients.reaction.has_key(ci):
11988  */
11989  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 656, __pyx_L1_error)
11990  if (__pyx_t_8) {
11991 
11992  /* "ADR.pyx":657
11993  * for flag in coefficients.potential[ci].values():
11994  * if flag == 'nonlinear':
11995  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
11996  * if coefficients.reaction.has_key(ci):
11997  * for flag in coefficients.reaction[ci].values():
11998  */
11999  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(1, 657, __pyx_L1_error)
12000 
12001  /* "ADR.pyx":656
12002  * if coefficients.potential.has_key(ci):
12003  * for flag in coefficients.potential[ci].values():
12004  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12005  * self.stabilizationIsNonlinear=True
12006  * if coefficients.reaction.has_key(ci):
12007  */
12008  }
12009 
12010  /* "ADR.pyx":655
12011  * self.stabilizationIsNonlinear=True
12012  * if coefficients.potential.has_key(ci):
12013  * for flag in coefficients.potential[ci].values(): # <<<<<<<<<<<<<<
12014  * if flag == 'nonlinear':
12015  * self.stabilizationIsNonlinear=True
12016  */
12017  }
12018  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12019 
12020  /* "ADR.pyx":654
12021  * if flag != 'constant':
12022  * self.stabilizationIsNonlinear=True
12023  * if coefficients.potential.has_key(ci): # <<<<<<<<<<<<<<
12024  * for flag in coefficients.potential[ci].values():
12025  * if flag == 'nonlinear':
12026  */
12027  }
12028 
12029  /* "ADR.pyx":658
12030  * if flag == 'nonlinear':
12031  * self.stabilizationIsNonlinear=True
12032  * if coefficients.reaction.has_key(ci): # <<<<<<<<<<<<<<
12033  * for flag in coefficients.reaction[ci].values():
12034  * if flag == 'nonlinear':
12035  */
12036  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_reaction); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 658, __pyx_L1_error)
12037  __Pyx_GOTREF(__pyx_t_7);
12038  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
12039  __Pyx_GOTREF(__pyx_t_2);
12040  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12041  __pyx_t_7 = NULL;
12042  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12043  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
12044  if (likely(__pyx_t_7)) {
12045  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12046  __Pyx_INCREF(__pyx_t_7);
12047  __Pyx_INCREF(function);
12048  __Pyx_DECREF_SET(__pyx_t_2, function);
12049  }
12050  }
12051  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_ci) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci);
12052  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12053  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 658, __pyx_L1_error)
12054  __Pyx_GOTREF(__pyx_t_1);
12055  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12056  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 658, __pyx_L1_error)
12057  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12058  if (__pyx_t_8) {
12059 
12060  /* "ADR.pyx":659
12061  * self.stabilizationIsNonlinear=True
12062  * if coefficients.reaction.has_key(ci):
12063  * for flag in coefficients.reaction[ci].values(): # <<<<<<<<<<<<<<
12064  * if flag == 'nonlinear':
12065  * self.stabilizationIsNonlinear=True
12066  */
12067  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_reaction); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 659, __pyx_L1_error)
12068  __Pyx_GOTREF(__pyx_t_2);
12069  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 659, __pyx_L1_error)
12070  __Pyx_GOTREF(__pyx_t_7);
12071  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12072  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 659, __pyx_L1_error)
12073  __Pyx_GOTREF(__pyx_t_2);
12074  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12075  __pyx_t_7 = NULL;
12076  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12077  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
12078  if (likely(__pyx_t_7)) {
12079  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12080  __Pyx_INCREF(__pyx_t_7);
12081  __Pyx_INCREF(function);
12082  __Pyx_DECREF_SET(__pyx_t_2, function);
12083  }
12084  }
12085  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
12086  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12087  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 659, __pyx_L1_error)
12088  __Pyx_GOTREF(__pyx_t_1);
12089  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12090  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12091  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
12092  __pyx_t_10 = NULL;
12093  } else {
12094  __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 659, __pyx_L1_error)
12095  __Pyx_GOTREF(__pyx_t_2);
12096  __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 659, __pyx_L1_error)
12097  }
12098  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12099  for (;;) {
12100  if (likely(!__pyx_t_10)) {
12101  if (likely(PyList_CheckExact(__pyx_t_2))) {
12102  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
12103  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12104  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 659, __pyx_L1_error)
12105  #else
12106  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 659, __pyx_L1_error)
12107  __Pyx_GOTREF(__pyx_t_1);
12108  #endif
12109  } else {
12110  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
12111  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12112  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 659, __pyx_L1_error)
12113  #else
12114  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 659, __pyx_L1_error)
12115  __Pyx_GOTREF(__pyx_t_1);
12116  #endif
12117  }
12118  } else {
12119  __pyx_t_1 = __pyx_t_10(__pyx_t_2);
12120  if (unlikely(!__pyx_t_1)) {
12121  PyObject* exc_type = PyErr_Occurred();
12122  if (exc_type) {
12123  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12124  else __PYX_ERR(1, 659, __pyx_L1_error)
12125  }
12126  break;
12127  }
12128  __Pyx_GOTREF(__pyx_t_1);
12129  }
12130  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_1);
12131  __pyx_t_1 = 0;
12132 
12133  /* "ADR.pyx":660
12134  * if coefficients.reaction.has_key(ci):
12135  * for flag in coefficients.reaction[ci].values():
12136  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12137  * self.stabilizationIsNonlinear=True
12138  * if coefficients.hamiltonian.has_key(ci):
12139  */
12140  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 660, __pyx_L1_error)
12141  if (__pyx_t_8) {
12142 
12143  /* "ADR.pyx":661
12144  * for flag in coefficients.reaction[ci].values():
12145  * if flag == 'nonlinear':
12146  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
12147  * if coefficients.hamiltonian.has_key(ci):
12148  * for flag in coefficients.hamiltonian[ci].values():
12149  */
12150  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(1, 661, __pyx_L1_error)
12151 
12152  /* "ADR.pyx":660
12153  * if coefficients.reaction.has_key(ci):
12154  * for flag in coefficients.reaction[ci].values():
12155  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12156  * self.stabilizationIsNonlinear=True
12157  * if coefficients.hamiltonian.has_key(ci):
12158  */
12159  }
12160 
12161  /* "ADR.pyx":659
12162  * self.stabilizationIsNonlinear=True
12163  * if coefficients.reaction.has_key(ci):
12164  * for flag in coefficients.reaction[ci].values(): # <<<<<<<<<<<<<<
12165  * if flag == 'nonlinear':
12166  * self.stabilizationIsNonlinear=True
12167  */
12168  }
12169  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12170 
12171  /* "ADR.pyx":658
12172  * if flag == 'nonlinear':
12173  * self.stabilizationIsNonlinear=True
12174  * if coefficients.reaction.has_key(ci): # <<<<<<<<<<<<<<
12175  * for flag in coefficients.reaction[ci].values():
12176  * if flag == 'nonlinear':
12177  */
12178  }
12179 
12180  /* "ADR.pyx":662
12181  * if flag == 'nonlinear':
12182  * self.stabilizationIsNonlinear=True
12183  * if coefficients.hamiltonian.has_key(ci): # <<<<<<<<<<<<<<
12184  * for flag in coefficients.hamiltonian[ci].values():
12185  * if flag == 'nonlinear':
12186  */
12187  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_hamiltonian); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 662, __pyx_L1_error)
12188  __Pyx_GOTREF(__pyx_t_1);
12189  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 662, __pyx_L1_error)
12190  __Pyx_GOTREF(__pyx_t_7);
12191  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12192  __pyx_t_1 = NULL;
12193  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
12194  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
12195  if (likely(__pyx_t_1)) {
12196  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12197  __Pyx_INCREF(__pyx_t_1);
12198  __Pyx_INCREF(function);
12199  __Pyx_DECREF_SET(__pyx_t_7, function);
12200  }
12201  }
12202  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, __pyx_v_ci) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_ci);
12203  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12204  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 662, __pyx_L1_error)
12205  __Pyx_GOTREF(__pyx_t_2);
12206  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12207  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 662, __pyx_L1_error)
12208  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12209  if (__pyx_t_8) {
12210 
12211  /* "ADR.pyx":663
12212  * self.stabilizationIsNonlinear=True
12213  * if coefficients.hamiltonian.has_key(ci):
12214  * for flag in coefficients.hamiltonian[ci].values(): # <<<<<<<<<<<<<<
12215  * if flag == 'nonlinear':
12216  * self.stabilizationIsNonlinear=True
12217  */
12218  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_hamiltonian); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 663, __pyx_L1_error)
12219  __Pyx_GOTREF(__pyx_t_7);
12220  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error)
12221  __Pyx_GOTREF(__pyx_t_1);
12222  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12223  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 663, __pyx_L1_error)
12224  __Pyx_GOTREF(__pyx_t_7);
12225  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12226  __pyx_t_1 = NULL;
12227  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
12228  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
12229  if (likely(__pyx_t_1)) {
12230  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
12231  __Pyx_INCREF(__pyx_t_1);
12232  __Pyx_INCREF(function);
12233  __Pyx_DECREF_SET(__pyx_t_7, function);
12234  }
12235  }
12236  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
12237  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12238  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
12239  __Pyx_GOTREF(__pyx_t_2);
12240  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12241  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
12242  __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
12243  __pyx_t_10 = NULL;
12244  } else {
12245  __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 663, __pyx_L1_error)
12246  __Pyx_GOTREF(__pyx_t_7);
12247  __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 663, __pyx_L1_error)
12248  }
12249  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12250  for (;;) {
12251  if (likely(!__pyx_t_10)) {
12252  if (likely(PyList_CheckExact(__pyx_t_7))) {
12253  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
12254  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12255  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 663, __pyx_L1_error)
12256  #else
12257  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
12258  __Pyx_GOTREF(__pyx_t_2);
12259  #endif
12260  } else {
12261  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
12262  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12263  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 663, __pyx_L1_error)
12264  #else
12265  __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
12266  __Pyx_GOTREF(__pyx_t_2);
12267  #endif
12268  }
12269  } else {
12270  __pyx_t_2 = __pyx_t_10(__pyx_t_7);
12271  if (unlikely(!__pyx_t_2)) {
12272  PyObject* exc_type = PyErr_Occurred();
12273  if (exc_type) {
12274  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12275  else __PYX_ERR(1, 663, __pyx_L1_error)
12276  }
12277  break;
12278  }
12279  __Pyx_GOTREF(__pyx_t_2);
12280  }
12281  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
12282  __pyx_t_2 = 0;
12283 
12284  /* "ADR.pyx":664
12285  * if coefficients.hamiltonian.has_key(ci):
12286  * for flag in coefficients.hamiltonian[ci].values():
12287  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12288  * self.stabilizationIsNonlinear=True
12289  * #determine if we need element boundary storage
12290  */
12291  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_flag, __pyx_n_s_nonlinear, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 664, __pyx_L1_error)
12292  if (__pyx_t_8) {
12293 
12294  /* "ADR.pyx":665
12295  * for flag in coefficients.hamiltonian[ci].values():
12296  * if flag == 'nonlinear':
12297  * self.stabilizationIsNonlinear=True # <<<<<<<<<<<<<<
12298  * #determine if we need element boundary storage
12299  * self.elementBoundaryIntegrals = {}
12300  */
12301  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stabilizationIsNonlinear, Py_True) < 0) __PYX_ERR(1, 665, __pyx_L1_error)
12302 
12303  /* "ADR.pyx":664
12304  * if coefficients.hamiltonian.has_key(ci):
12305  * for flag in coefficients.hamiltonian[ci].values():
12306  * if flag == 'nonlinear': # <<<<<<<<<<<<<<
12307  * self.stabilizationIsNonlinear=True
12308  * #determine if we need element boundary storage
12309  */
12310  }
12311 
12312  /* "ADR.pyx":663
12313  * self.stabilizationIsNonlinear=True
12314  * if coefficients.hamiltonian.has_key(ci):
12315  * for flag in coefficients.hamiltonian[ci].values(): # <<<<<<<<<<<<<<
12316  * if flag == 'nonlinear':
12317  * self.stabilizationIsNonlinear=True
12318  */
12319  }
12320  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12321 
12322  /* "ADR.pyx":662
12323  * if flag == 'nonlinear':
12324  * self.stabilizationIsNonlinear=True
12325  * if coefficients.hamiltonian.has_key(ci): # <<<<<<<<<<<<<<
12326  * for flag in coefficients.hamiltonian[ci].values():
12327  * if flag == 'nonlinear':
12328  */
12329  }
12330 
12331  /* "ADR.pyx":640
12332  * #cek come back
12333  * if self.stabilization is not None:
12334  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12335  * if coefficients.mass.has_key(ci):
12336  * for flag in coefficients.mass[ci].values():
12337  */
12338  }
12339  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12340 
12341  /* "ADR.pyx":639
12342  * self.stabilizationIsNonlinear = False
12343  * #cek come back
12344  * if self.stabilization is not None: # <<<<<<<<<<<<<<
12345  * for ci in range(self.nc):
12346  * if coefficients.mass.has_key(ci):
12347  */
12348  }
12349 
12350  /* "ADR.pyx":667
12351  * self.stabilizationIsNonlinear=True
12352  * #determine if we need element boundary storage
12353  * self.elementBoundaryIntegrals = {} # <<<<<<<<<<<<<<
12354  * for ci in range(self.nc):
12355  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12356  */
12357  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 667, __pyx_L1_error)
12358  __Pyx_GOTREF(__pyx_t_6);
12359  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryIntegrals, __pyx_t_6) < 0) __PYX_ERR(1, 667, __pyx_L1_error)
12360  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12361 
12362  /* "ADR.pyx":668
12363  * #determine if we need element boundary storage
12364  * self.elementBoundaryIntegrals = {}
12365  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12366  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12367  * (numericalFluxType is not None) or
12368  */
12369  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 668, __pyx_L1_error)
12370  __Pyx_GOTREF(__pyx_t_6);
12371  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 668, __pyx_L1_error)
12372  __Pyx_GOTREF(__pyx_t_7);
12373  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12374  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
12375  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
12376  __pyx_t_5 = NULL;
12377  } else {
12378  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 668, __pyx_L1_error)
12379  __Pyx_GOTREF(__pyx_t_6);
12380  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 668, __pyx_L1_error)
12381  }
12382  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12383  for (;;) {
12384  if (likely(!__pyx_t_5)) {
12385  if (likely(PyList_CheckExact(__pyx_t_6))) {
12386  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
12387  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12388  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 668, __pyx_L1_error)
12389  #else
12390  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 668, __pyx_L1_error)
12391  __Pyx_GOTREF(__pyx_t_7);
12392  #endif
12393  } else {
12394  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
12395  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12396  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 668, __pyx_L1_error)
12397  #else
12398  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 668, __pyx_L1_error)
12399  __Pyx_GOTREF(__pyx_t_7);
12400  #endif
12401  }
12402  } else {
12403  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
12404  if (unlikely(!__pyx_t_7)) {
12405  PyObject* exc_type = PyErr_Occurred();
12406  if (exc_type) {
12407  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12408  else __PYX_ERR(1, 668, __pyx_L1_error)
12409  }
12410  break;
12411  }
12412  __Pyx_GOTREF(__pyx_t_7);
12413  }
12414  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
12415  __pyx_t_7 = 0;
12416 
12417  /* "ADR.pyx":669
12418  * self.elementBoundaryIntegrals = {}
12419  * for ci in range(self.nc):
12420  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or # <<<<<<<<<<<<<<
12421  * (numericalFluxType is not None) or
12422  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12423  */
12424  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_conservativeFlux); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 669, __pyx_L1_error)
12425  __Pyx_GOTREF(__pyx_t_2);
12426  __pyx_t_8 = (__pyx_t_2 != Py_None);
12427  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12428  if (!__pyx_t_8) {
12429  } else {
12430  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 669, __pyx_L1_error)
12431  __Pyx_GOTREF(__pyx_t_2);
12432  __pyx_t_7 = __pyx_t_2;
12433  __pyx_t_2 = 0;
12434  goto __pyx_L37_bool_binop_done;
12435  }
12436 
12437  /* "ADR.pyx":670
12438  * for ci in range(self.nc):
12439  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12440  * (numericalFluxType is not None) or # <<<<<<<<<<<<<<
12441  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12442  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12443  */
12444  __pyx_t_8 = (__pyx_v_numericalFluxType != Py_None);
12445  if (!__pyx_t_8) {
12446  } else {
12447  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 670, __pyx_L1_error)
12448  __Pyx_GOTREF(__pyx_t_2);
12449  __pyx_t_7 = __pyx_t_2;
12450  __pyx_t_2 = 0;
12451  goto __pyx_L37_bool_binop_done;
12452  }
12453 
12454  /* "ADR.pyx":671
12455  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12456  * (numericalFluxType is not None) or
12457  * (self.fluxBoundaryConditions[ci] == 'outFlow') or # <<<<<<<<<<<<<<
12458  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12459  * (self.fluxBoundaryConditions[ci] == 'setFlow'))
12460  */
12461  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 671, __pyx_L1_error)
12462  __Pyx_GOTREF(__pyx_t_2);
12463  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 671, __pyx_L1_error)
12464  __Pyx_GOTREF(__pyx_t_1);
12465  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12466  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_n_s_outFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 671, __pyx_L1_error)
12467  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12468  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 671, __pyx_L1_error)
12469  if (!__pyx_t_8) {
12470  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12471  } else {
12472  __Pyx_INCREF(__pyx_t_2);
12473  __pyx_t_7 = __pyx_t_2;
12474  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12475  goto __pyx_L37_bool_binop_done;
12476  }
12477 
12478  /* "ADR.pyx":672
12479  * (numericalFluxType is not None) or
12480  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12481  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or # <<<<<<<<<<<<<<
12482  * (self.fluxBoundaryConditions[ci] == 'setFlow'))
12483  * #
12484  */
12485  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 672, __pyx_L1_error)
12486  __Pyx_GOTREF(__pyx_t_2);
12487  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 672, __pyx_L1_error)
12488  __Pyx_GOTREF(__pyx_t_1);
12489  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12490  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_n_s_mixedFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 672, __pyx_L1_error)
12491  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12492  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 672, __pyx_L1_error)
12493  if (!__pyx_t_8) {
12494  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12495  } else {
12496  __Pyx_INCREF(__pyx_t_2);
12497  __pyx_t_7 = __pyx_t_2;
12498  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12499  goto __pyx_L37_bool_binop_done;
12500  }
12501 
12502  /* "ADR.pyx":673
12503  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12504  * (self.fluxBoundaryConditions[ci] == 'mixedFlow') or
12505  * (self.fluxBoundaryConditions[ci] == 'setFlow')) # <<<<<<<<<<<<<<
12506  * #
12507  * #calculate some dimensions
12508  */
12509  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 673, __pyx_L1_error)
12510  __Pyx_GOTREF(__pyx_t_2);
12511  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ci); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 673, __pyx_L1_error)
12512  __Pyx_GOTREF(__pyx_t_1);
12513  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12514  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_n_s_setFlow, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 673, __pyx_L1_error)
12515  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12516  __Pyx_INCREF(__pyx_t_2);
12517  __pyx_t_7 = __pyx_t_2;
12518  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12519  __pyx_L37_bool_binop_done:;
12520 
12521  /* "ADR.pyx":669
12522  * self.elementBoundaryIntegrals = {}
12523  * for ci in range(self.nc):
12524  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or # <<<<<<<<<<<<<<
12525  * (numericalFluxType is not None) or
12526  * (self.fluxBoundaryConditions[ci] == 'outFlow') or
12527  */
12528  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryIntegrals); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 669, __pyx_L1_error)
12529  __Pyx_GOTREF(__pyx_t_2);
12530  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_ci, __pyx_t_7) < 0)) __PYX_ERR(1, 669, __pyx_L1_error)
12531  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12532  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12533 
12534  /* "ADR.pyx":668
12535  * #determine if we need element boundary storage
12536  * self.elementBoundaryIntegrals = {}
12537  * for ci in range(self.nc): # <<<<<<<<<<<<<<
12538  * self.elementBoundaryIntegrals[ci] = ((self.conservativeFlux is not None) or
12539  * (numericalFluxType is not None) or
12540  */
12541  }
12542  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12543 
12544  /* "ADR.pyx":677
12545  * #calculate some dimensions
12546  * #
12547  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables # <<<<<<<<<<<<<<
12548  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12549  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12550  */
12551  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 677, __pyx_L1_error)
12552  __Pyx_GOTREF(__pyx_t_6);
12553  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 677, __pyx_L1_error)
12554  __Pyx_GOTREF(__pyx_t_7);
12555  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12556  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 677, __pyx_L1_error)
12557  __Pyx_GOTREF(__pyx_t_6);
12558  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12559  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 677, __pyx_L1_error)
12560  __Pyx_GOTREF(__pyx_t_7);
12561  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12562  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global, __pyx_t_7) < 0) __PYX_ERR(1, 677, __pyx_L1_error)
12563  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12564 
12565  /* "ADR.pyx":678
12566  * #
12567  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables
12568  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()] # <<<<<<<<<<<<<<
12569  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12570  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12571  */
12572  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 678, __pyx_L1_error)
12573  __Pyx_GOTREF(__pyx_t_7);
12574  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 678, __pyx_L1_error)
12575  __Pyx_GOTREF(__pyx_t_2);
12576  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 678, __pyx_L1_error)
12577  __Pyx_GOTREF(__pyx_t_1);
12578  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12579  __pyx_t_2 = NULL;
12580  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12581  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
12582  if (likely(__pyx_t_2)) {
12583  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12584  __Pyx_INCREF(__pyx_t_2);
12585  __Pyx_INCREF(function);
12586  __Pyx_DECREF_SET(__pyx_t_1, function);
12587  }
12588  }
12589  __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
12590  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12591  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 678, __pyx_L1_error)
12592  __Pyx_GOTREF(__pyx_t_6);
12593  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12594  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
12595  __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
12596  __pyx_t_5 = NULL;
12597  } else {
12598  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 678, __pyx_L1_error)
12599  __Pyx_GOTREF(__pyx_t_1);
12600  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 678, __pyx_L1_error)
12601  }
12602  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12603  for (;;) {
12604  if (likely(!__pyx_t_5)) {
12605  if (likely(PyList_CheckExact(__pyx_t_1))) {
12606  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
12607  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12608  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 678, __pyx_L1_error)
12609  #else
12610  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 678, __pyx_L1_error)
12611  __Pyx_GOTREF(__pyx_t_6);
12612  #endif
12613  } else {
12614  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
12615  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12616  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 678, __pyx_L1_error)
12617  #else
12618  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 678, __pyx_L1_error)
12619  __Pyx_GOTREF(__pyx_t_6);
12620  #endif
12621  }
12622  } else {
12623  __pyx_t_6 = __pyx_t_5(__pyx_t_1);
12624  if (unlikely(!__pyx_t_6)) {
12625  PyObject* exc_type = PyErr_Occurred();
12626  if (exc_type) {
12627  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12628  else __PYX_ERR(1, 678, __pyx_L1_error)
12629  }
12630  break;
12631  }
12632  __Pyx_GOTREF(__pyx_t_6);
12633  }
12634  __Pyx_XDECREF_SET(__pyx_v_u_j, __pyx_t_6);
12635  __pyx_t_6 = 0;
12636  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_u_j, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 678, __pyx_L1_error)
12637  __Pyx_GOTREF(__pyx_t_6);
12638  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 678, __pyx_L1_error)
12639  __Pyx_GOTREF(__pyx_t_2);
12640  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12641  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 678, __pyx_L1_error)
12642  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12643  }
12644  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12645  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element, __pyx_t_7) < 0) __PYX_ERR(1, 678, __pyx_L1_error)
12646  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12647 
12648  /* "ADR.pyx":679
12649  * self.nSpace_global = self.u[0].femSpace.nSpace_global #assume same space dim for all variables
12650  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12651  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()] # <<<<<<<<<<<<<<
12652  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12653  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12654  */
12655  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 679, __pyx_L1_error)
12656  __Pyx_GOTREF(__pyx_t_7);
12657  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_phi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 679, __pyx_L1_error)
12658  __Pyx_GOTREF(__pyx_t_2);
12659  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 679, __pyx_L1_error)
12660  __Pyx_GOTREF(__pyx_t_6);
12661  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12662  __pyx_t_2 = NULL;
12663  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
12664  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
12665  if (likely(__pyx_t_2)) {
12666  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12667  __Pyx_INCREF(__pyx_t_2);
12668  __Pyx_INCREF(function);
12669  __Pyx_DECREF_SET(__pyx_t_6, function);
12670  }
12671  }
12672  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
12673  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12674  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
12675  __Pyx_GOTREF(__pyx_t_1);
12676  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12677  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12678  __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
12679  __pyx_t_5 = NULL;
12680  } else {
12681  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 679, __pyx_L1_error)
12682  __Pyx_GOTREF(__pyx_t_6);
12683  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 679, __pyx_L1_error)
12684  }
12685  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12686  for (;;) {
12687  if (likely(!__pyx_t_5)) {
12688  if (likely(PyList_CheckExact(__pyx_t_6))) {
12689  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
12690  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12691  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 679, __pyx_L1_error)
12692  #else
12693  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
12694  __Pyx_GOTREF(__pyx_t_1);
12695  #endif
12696  } else {
12697  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
12698  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12699  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 679, __pyx_L1_error)
12700  #else
12701  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
12702  __Pyx_GOTREF(__pyx_t_1);
12703  #endif
12704  }
12705  } else {
12706  __pyx_t_1 = __pyx_t_5(__pyx_t_6);
12707  if (unlikely(!__pyx_t_1)) {
12708  PyObject* exc_type = PyErr_Occurred();
12709  if (exc_type) {
12710  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12711  else __PYX_ERR(1, 679, __pyx_L1_error)
12712  }
12713  break;
12714  }
12715  __Pyx_GOTREF(__pyx_t_1);
12716  }
12717  __Pyx_XDECREF_SET(__pyx_v_phi_k, __pyx_t_1);
12718  __pyx_t_1 = 0;
12719  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_phi_k, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
12720  __Pyx_GOTREF(__pyx_t_1);
12721  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 679, __pyx_L1_error)
12722  __Pyx_GOTREF(__pyx_t_2);
12723  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12724  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 679, __pyx_L1_error)
12725  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12726  }
12727  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12728  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_phi_trial_element, __pyx_t_7) < 0) __PYX_ERR(1, 679, __pyx_L1_error)
12729  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12730 
12731  /* "ADR.pyx":680
12732  * self.nDOF_trial_element = [u_j.femSpace.max_nDOF_element for u_j in self.u.values()]
12733  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12734  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()] # <<<<<<<<<<<<<<
12735  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12736  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12737  */
12738  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 680, __pyx_L1_error)
12739  __Pyx_GOTREF(__pyx_t_7);
12740  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_phi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 680, __pyx_L1_error)
12741  __Pyx_GOTREF(__pyx_t_2);
12742  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 680, __pyx_L1_error)
12743  __Pyx_GOTREF(__pyx_t_1);
12744  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12745  __pyx_t_2 = NULL;
12746  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
12747  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
12748  if (likely(__pyx_t_2)) {
12749  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
12750  __Pyx_INCREF(__pyx_t_2);
12751  __Pyx_INCREF(function);
12752  __Pyx_DECREF_SET(__pyx_t_1, function);
12753  }
12754  }
12755  __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
12756  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12757  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 680, __pyx_L1_error)
12758  __Pyx_GOTREF(__pyx_t_6);
12759  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12760  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
12761  __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
12762  __pyx_t_5 = NULL;
12763  } else {
12764  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 680, __pyx_L1_error)
12765  __Pyx_GOTREF(__pyx_t_1);
12766  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 680, __pyx_L1_error)
12767  }
12768  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12769  for (;;) {
12770  if (likely(!__pyx_t_5)) {
12771  if (likely(PyList_CheckExact(__pyx_t_1))) {
12772  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
12773  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12774  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 680, __pyx_L1_error)
12775  #else
12776  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 680, __pyx_L1_error)
12777  __Pyx_GOTREF(__pyx_t_6);
12778  #endif
12779  } else {
12780  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
12781  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12782  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 680, __pyx_L1_error)
12783  #else
12784  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 680, __pyx_L1_error)
12785  __Pyx_GOTREF(__pyx_t_6);
12786  #endif
12787  }
12788  } else {
12789  __pyx_t_6 = __pyx_t_5(__pyx_t_1);
12790  if (unlikely(!__pyx_t_6)) {
12791  PyObject* exc_type = PyErr_Occurred();
12792  if (exc_type) {
12793  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12794  else __PYX_ERR(1, 680, __pyx_L1_error)
12795  }
12796  break;
12797  }
12798  __Pyx_GOTREF(__pyx_t_6);
12799  }
12800  __Pyx_XDECREF_SET(__pyx_v_phi_k, __pyx_t_6);
12801  __pyx_t_6 = 0;
12802  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_phi_k, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 680, __pyx_L1_error)
12803  __Pyx_GOTREF(__pyx_t_6);
12804  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 680, __pyx_L1_error)
12805  __Pyx_GOTREF(__pyx_t_2);
12806  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12807  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_interpolationConditions); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 680, __pyx_L1_error)
12808  __Pyx_GOTREF(__pyx_t_6);
12809  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12810  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 680, __pyx_L1_error)
12811  __Pyx_GOTREF(__pyx_t_2);
12812  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12813  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 680, __pyx_L1_error)
12814  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12815  }
12816  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12817  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_n_phi_ip_element, __pyx_t_7) < 0) __PYX_ERR(1, 680, __pyx_L1_error)
12818  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12819 
12820  /* "ADR.pyx":681
12821  * self.nDOF_phi_trial_element = [phi_k.femSpace.max_nDOF_element for phi_k in self.phi.values()]
12822  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12823  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()] # <<<<<<<<<<<<<<
12824  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12825  * self.nVDOF_element = sum(self.nDOF_trial_element)
12826  */
12827  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
12828  __Pyx_GOTREF(__pyx_t_7);
12829  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_testSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 681, __pyx_L1_error)
12830  __Pyx_GOTREF(__pyx_t_2);
12831  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 681, __pyx_L1_error)
12832  __Pyx_GOTREF(__pyx_t_6);
12833  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12834  __pyx_t_2 = NULL;
12835  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
12836  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
12837  if (likely(__pyx_t_2)) {
12838  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12839  __Pyx_INCREF(__pyx_t_2);
12840  __Pyx_INCREF(function);
12841  __Pyx_DECREF_SET(__pyx_t_6, function);
12842  }
12843  }
12844  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
12845  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12846  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error)
12847  __Pyx_GOTREF(__pyx_t_1);
12848  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12849  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
12850  __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
12851  __pyx_t_5 = NULL;
12852  } else {
12853  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 681, __pyx_L1_error)
12854  __Pyx_GOTREF(__pyx_t_6);
12855  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 681, __pyx_L1_error)
12856  }
12857  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12858  for (;;) {
12859  if (likely(!__pyx_t_5)) {
12860  if (likely(PyList_CheckExact(__pyx_t_6))) {
12861  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
12862  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12863  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
12864  #else
12865  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error)
12866  __Pyx_GOTREF(__pyx_t_1);
12867  #endif
12868  } else {
12869  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
12870  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12871  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
12872  #else
12873  __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error)
12874  __Pyx_GOTREF(__pyx_t_1);
12875  #endif
12876  }
12877  } else {
12878  __pyx_t_1 = __pyx_t_5(__pyx_t_6);
12879  if (unlikely(!__pyx_t_1)) {
12880  PyObject* exc_type = PyErr_Occurred();
12881  if (exc_type) {
12882  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12883  else __PYX_ERR(1, 681, __pyx_L1_error)
12884  }
12885  break;
12886  }
12887  __Pyx_GOTREF(__pyx_t_1);
12888  }
12889  __Pyx_XDECREF_SET(__pyx_v_femSpace, __pyx_t_1);
12890  __pyx_t_1 = 0;
12891  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_max_nDOF_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error)
12892  __Pyx_GOTREF(__pyx_t_1);
12893  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(1, 681, __pyx_L1_error)
12894  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12895  }
12896  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12897  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_test_element, __pyx_t_7) < 0) __PYX_ERR(1, 681, __pyx_L1_error)
12898  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12899 
12900  /* "ADR.pyx":682
12901  * self.n_phi_ip_element = [phi_k.femSpace.referenceFiniteElement.interpolationConditions.nQuadraturePoints for phi_k in self.phi.values()]
12902  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12903  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()] # <<<<<<<<<<<<<<
12904  * self.nVDOF_element = sum(self.nDOF_trial_element)
12905  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
12906  */
12907  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 682, __pyx_L1_error)
12908  __Pyx_GOTREF(__pyx_t_7);
12909  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 682, __pyx_L1_error)
12910  __Pyx_GOTREF(__pyx_t_1);
12911  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 682, __pyx_L1_error)
12912  __Pyx_GOTREF(__pyx_t_2);
12913  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12914  __pyx_t_1 = NULL;
12915  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12916  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
12917  if (likely(__pyx_t_1)) {
12918  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12919  __Pyx_INCREF(__pyx_t_1);
12920  __Pyx_INCREF(function);
12921  __Pyx_DECREF_SET(__pyx_t_2, function);
12922  }
12923  }
12924  __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
12925  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12926  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 682, __pyx_L1_error)
12927  __Pyx_GOTREF(__pyx_t_6);
12928  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12929  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
12930  __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
12931  __pyx_t_5 = NULL;
12932  } else {
12933  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 682, __pyx_L1_error)
12934  __Pyx_GOTREF(__pyx_t_2);
12935  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 682, __pyx_L1_error)
12936  }
12937  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12938  for (;;) {
12939  if (likely(!__pyx_t_5)) {
12940  if (likely(PyList_CheckExact(__pyx_t_2))) {
12941  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
12942  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12943  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 682, __pyx_L1_error)
12944  #else
12945  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 682, __pyx_L1_error)
12946  __Pyx_GOTREF(__pyx_t_6);
12947  #endif
12948  } else {
12949  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
12950  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12951  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 682, __pyx_L1_error)
12952  #else
12953  __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 682, __pyx_L1_error)
12954  __Pyx_GOTREF(__pyx_t_6);
12955  #endif
12956  }
12957  } else {
12958  __pyx_t_6 = __pyx_t_5(__pyx_t_2);
12959  if (unlikely(!__pyx_t_6)) {
12960  PyObject* exc_type = PyErr_Occurred();
12961  if (exc_type) {
12962  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12963  else __PYX_ERR(1, 682, __pyx_L1_error)
12964  }
12965  break;
12966  }
12967  __Pyx_GOTREF(__pyx_t_6);
12968  }
12969  __Pyx_XDECREF_SET(__pyx_v_dc, __pyx_t_6);
12970  __pyx_t_6 = 0;
12971  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dc, __pyx_n_s_nFreeDOF_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 682, __pyx_L1_error)
12972  __Pyx_GOTREF(__pyx_t_6);
12973  if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 682, __pyx_L1_error)
12974  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12975  }
12976  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12977  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nFreeDOF_global, __pyx_t_7) < 0) __PYX_ERR(1, 682, __pyx_L1_error)
12978  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12979 
12980  /* "ADR.pyx":683
12981  * self.nDOF_test_element = [femSpace.max_nDOF_element for femSpace in self.testSpace.values()]
12982  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12983  * self.nVDOF_element = sum(self.nDOF_trial_element) # <<<<<<<<<<<<<<
12984  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
12985  * #
12986  */
12987  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 683, __pyx_L1_error)
12988  __Pyx_GOTREF(__pyx_t_7);
12989  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 683, __pyx_L1_error)
12990  __Pyx_GOTREF(__pyx_t_2);
12991  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12992  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nVDOF_element, __pyx_t_2) < 0) __PYX_ERR(1, 683, __pyx_L1_error)
12993  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12994 
12995  /* "ADR.pyx":684
12996  * self.nFreeDOF_global = [dc.nFreeDOF_global for dc in self.dirichletConditions.values()]
12997  * self.nVDOF_element = sum(self.nDOF_trial_element)
12998  * self.nFreeVDOF_global = sum(self.nFreeDOF_global) # <<<<<<<<<<<<<<
12999  * #
13000  * NonlinearEquation.__init__(self,self.nFreeVDOF_global)
13001  */
13002  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nFreeDOF_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 684, __pyx_L1_error)
13003  __Pyx_GOTREF(__pyx_t_2);
13004  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 684, __pyx_L1_error)
13005  __Pyx_GOTREF(__pyx_t_7);
13006  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13007  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nFreeVDOF_global, __pyx_t_7) < 0) __PYX_ERR(1, 684, __pyx_L1_error)
13008  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13009 
13010  /* "ADR.pyx":686
13011  * self.nFreeVDOF_global = sum(self.nFreeDOF_global)
13012  * #
13013  * NonlinearEquation.__init__(self,self.nFreeVDOF_global) # <<<<<<<<<<<<<<
13014  * #
13015  * #build the quadrature point dictionaries from the input (this
13016  */
13017  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NonlinearEquation); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 686, __pyx_L1_error)
13018  __Pyx_GOTREF(__pyx_t_2);
13019  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 686, __pyx_L1_error)
13020  __Pyx_GOTREF(__pyx_t_6);
13021  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13022  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nFreeVDOF_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 686, __pyx_L1_error)
13023  __Pyx_GOTREF(__pyx_t_2);
13024  __pyx_t_1 = NULL;
13025  __pyx_t_14 = 0;
13026  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13027  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
13028  if (likely(__pyx_t_1)) {
13029  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13030  __Pyx_INCREF(__pyx_t_1);
13031  __Pyx_INCREF(function);
13032  __Pyx_DECREF_SET(__pyx_t_6, function);
13033  __pyx_t_14 = 1;
13034  }
13035  }
13036  #if CYTHON_FAST_PYCALL
13037  if (PyFunction_Check(__pyx_t_6)) {
13038  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_self, __pyx_t_2};
13039  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 686, __pyx_L1_error)
13040  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13041  __Pyx_GOTREF(__pyx_t_7);
13042  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13043  } else
13044  #endif
13045  #if CYTHON_FAST_PYCCALL
13046  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13047  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_self, __pyx_t_2};
13048  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 686, __pyx_L1_error)
13049  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13050  __Pyx_GOTREF(__pyx_t_7);
13051  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13052  } else
13053  #endif
13054  {
13055  __pyx_t_11 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 686, __pyx_L1_error)
13056  __Pyx_GOTREF(__pyx_t_11);
13057  if (__pyx_t_1) {
13058  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
13059  }
13060  __Pyx_INCREF(__pyx_v_self);
13061  __Pyx_GIVEREF(__pyx_v_self);
13062  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_14, __pyx_v_self);
13063  __Pyx_GIVEREF(__pyx_t_2);
13064  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_14, __pyx_t_2);
13065  __pyx_t_2 = 0;
13066  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 686, __pyx_L1_error)
13067  __Pyx_GOTREF(__pyx_t_7);
13068  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13069  }
13070  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13071  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13072 
13073  /* "ADR.pyx":692
13074  * #complete)
13075  * #
13076  * elementQuadratureDict={} # <<<<<<<<<<<<<<
13077  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13078  * if elemQuadIsDict: #set terms manually
13079  */
13080  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 692, __pyx_L1_error)
13081  __Pyx_GOTREF(__pyx_t_7);
13082  __pyx_v_elementQuadratureDict = ((PyObject*)__pyx_t_7);
13083  __pyx_t_7 = 0;
13084 
13085  /* "ADR.pyx":693
13086  * #
13087  * elementQuadratureDict={}
13088  * elemQuadIsDict = isinstance(elementQuadrature,dict) # <<<<<<<<<<<<<<
13089  * if elemQuadIsDict: #set terms manually
13090  * for I in self.coefficients.elementIntegralKeys:
13091  */
13092  __pyx_t_8 = PyDict_Check(__pyx_v_elementQuadrature);
13093  __pyx_v_elemQuadIsDict = __pyx_t_8;
13094 
13095  /* "ADR.pyx":694
13096  * elementQuadratureDict={}
13097  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13098  * if elemQuadIsDict: #set terms manually # <<<<<<<<<<<<<<
13099  * for I in self.coefficients.elementIntegralKeys:
13100  * if elementQuadrature.has_key(I):
13101  */
13102  __pyx_t_8 = (__pyx_v_elemQuadIsDict != 0);
13103  if (__pyx_t_8) {
13104 
13105  /* "ADR.pyx":695
13106  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13107  * if elemQuadIsDict: #set terms manually
13108  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13109  * if elementQuadrature.has_key(I):
13110  * elementQuadratureDict[I] = elementQuadrature[I]
13111  */
13112  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 695, __pyx_L1_error)
13113  __Pyx_GOTREF(__pyx_t_7);
13114  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 695, __pyx_L1_error)
13115  __Pyx_GOTREF(__pyx_t_6);
13116  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13117  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
13118  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13119  __pyx_t_5 = NULL;
13120  } else {
13121  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 695, __pyx_L1_error)
13122  __Pyx_GOTREF(__pyx_t_7);
13123  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 695, __pyx_L1_error)
13124  }
13125  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13126  for (;;) {
13127  if (likely(!__pyx_t_5)) {
13128  if (likely(PyList_CheckExact(__pyx_t_7))) {
13129  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13130  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13131  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 695, __pyx_L1_error)
13132  #else
13133  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 695, __pyx_L1_error)
13134  __Pyx_GOTREF(__pyx_t_6);
13135  #endif
13136  } else {
13137  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13138  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13139  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 695, __pyx_L1_error)
13140  #else
13141  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 695, __pyx_L1_error)
13142  __Pyx_GOTREF(__pyx_t_6);
13143  #endif
13144  }
13145  } else {
13146  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
13147  if (unlikely(!__pyx_t_6)) {
13148  PyObject* exc_type = PyErr_Occurred();
13149  if (exc_type) {
13150  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13151  else __PYX_ERR(1, 695, __pyx_L1_error)
13152  }
13153  break;
13154  }
13155  __Pyx_GOTREF(__pyx_t_6);
13156  }
13157  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
13158  __pyx_t_6 = 0;
13159 
13160  /* "ADR.pyx":696
13161  * if elemQuadIsDict: #set terms manually
13162  * for I in self.coefficients.elementIntegralKeys:
13163  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13164  * elementQuadratureDict[I] = elementQuadrature[I]
13165  * else:
13166  */
13167  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 696, __pyx_L1_error)
13168  __Pyx_GOTREF(__pyx_t_11);
13169  __pyx_t_2 = NULL;
13170  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
13171  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
13172  if (likely(__pyx_t_2)) {
13173  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
13174  __Pyx_INCREF(__pyx_t_2);
13175  __Pyx_INCREF(function);
13176  __Pyx_DECREF_SET(__pyx_t_11, function);
13177  }
13178  }
13179  __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_v_I) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_I);
13180  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13181  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 696, __pyx_L1_error)
13182  __Pyx_GOTREF(__pyx_t_6);
13183  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13184  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 696, __pyx_L1_error)
13185  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13186  if (__pyx_t_8) {
13187 
13188  /* "ADR.pyx":697
13189  * for I in self.coefficients.elementIntegralKeys:
13190  * if elementQuadrature.has_key(I):
13191  * elementQuadratureDict[I] = elementQuadrature[I] # <<<<<<<<<<<<<<
13192  * else:
13193  * elementQuadratureDict[I] = elementQuadrature['default']
13194  */
13195  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 697, __pyx_L1_error)
13196  __Pyx_GOTREF(__pyx_t_6);
13197  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(1, 697, __pyx_L1_error)
13198  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13199 
13200  /* "ADR.pyx":696
13201  * if elemQuadIsDict: #set terms manually
13202  * for I in self.coefficients.elementIntegralKeys:
13203  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13204  * elementQuadratureDict[I] = elementQuadrature[I]
13205  * else:
13206  */
13207  goto __pyx_L55;
13208  }
13209 
13210  /* "ADR.pyx":699
13211  * elementQuadratureDict[I] = elementQuadrature[I]
13212  * else:
13213  * elementQuadratureDict[I] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13214  * else:
13215  * for I in self.coefficients.elementIntegralKeys:
13216  */
13217  /*else*/ {
13218  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 699, __pyx_L1_error)
13219  __Pyx_GOTREF(__pyx_t_6);
13220  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(1, 699, __pyx_L1_error)
13221  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13222  }
13223  __pyx_L55:;
13224 
13225  /* "ADR.pyx":695
13226  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13227  * if elemQuadIsDict: #set terms manually
13228  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13229  * if elementQuadrature.has_key(I):
13230  * elementQuadratureDict[I] = elementQuadrature[I]
13231  */
13232  }
13233  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13234 
13235  /* "ADR.pyx":694
13236  * elementQuadratureDict={}
13237  * elemQuadIsDict = isinstance(elementQuadrature,dict)
13238  * if elemQuadIsDict: #set terms manually # <<<<<<<<<<<<<<
13239  * for I in self.coefficients.elementIntegralKeys:
13240  * if elementQuadrature.has_key(I):
13241  */
13242  goto __pyx_L52;
13243  }
13244 
13245  /* "ADR.pyx":701
13246  * elementQuadratureDict[I] = elementQuadrature['default']
13247  * else:
13248  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13249  * elementQuadratureDict[I] = elementQuadrature
13250  * if self.stabilization is not None:
13251  */
13252  /*else*/ {
13253  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 701, __pyx_L1_error)
13254  __Pyx_GOTREF(__pyx_t_7);
13255  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 701, __pyx_L1_error)
13256  __Pyx_GOTREF(__pyx_t_6);
13257  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13258  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
13259  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13260  __pyx_t_5 = NULL;
13261  } else {
13262  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 701, __pyx_L1_error)
13263  __Pyx_GOTREF(__pyx_t_7);
13264  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 701, __pyx_L1_error)
13265  }
13266  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13267  for (;;) {
13268  if (likely(!__pyx_t_5)) {
13269  if (likely(PyList_CheckExact(__pyx_t_7))) {
13270  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13271  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13272  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 701, __pyx_L1_error)
13273  #else
13274  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 701, __pyx_L1_error)
13275  __Pyx_GOTREF(__pyx_t_6);
13276  #endif
13277  } else {
13278  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13279  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13280  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 701, __pyx_L1_error)
13281  #else
13282  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 701, __pyx_L1_error)
13283  __Pyx_GOTREF(__pyx_t_6);
13284  #endif
13285  }
13286  } else {
13287  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
13288  if (unlikely(!__pyx_t_6)) {
13289  PyObject* exc_type = PyErr_Occurred();
13290  if (exc_type) {
13291  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13292  else __PYX_ERR(1, 701, __pyx_L1_error)
13293  }
13294  break;
13295  }
13296  __Pyx_GOTREF(__pyx_t_6);
13297  }
13298  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
13299  __pyx_t_6 = 0;
13300 
13301  /* "ADR.pyx":702
13302  * else:
13303  * for I in self.coefficients.elementIntegralKeys:
13304  * elementQuadratureDict[I] = elementQuadrature # <<<<<<<<<<<<<<
13305  * if self.stabilization is not None:
13306  * for I in self.coefficients.elementIntegralKeys:
13307  */
13308  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_v_I, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(1, 702, __pyx_L1_error)
13309 
13310  /* "ADR.pyx":701
13311  * elementQuadratureDict[I] = elementQuadrature['default']
13312  * else:
13313  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13314  * elementQuadratureDict[I] = elementQuadrature
13315  * if self.stabilization is not None:
13316  */
13317  }
13318  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13319  }
13320  __pyx_L52:;
13321 
13322  /* "ADR.pyx":703
13323  * for I in self.coefficients.elementIntegralKeys:
13324  * elementQuadratureDict[I] = elementQuadrature
13325  * if self.stabilization is not None: # <<<<<<<<<<<<<<
13326  * for I in self.coefficients.elementIntegralKeys:
13327  * if elemQuadIsDict:
13328  */
13329  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 703, __pyx_L1_error)
13330  __Pyx_GOTREF(__pyx_t_7);
13331  __pyx_t_8 = (__pyx_t_7 != Py_None);
13332  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13333  __pyx_t_3 = (__pyx_t_8 != 0);
13334  if (__pyx_t_3) {
13335 
13336  /* "ADR.pyx":704
13337  * elementQuadratureDict[I] = elementQuadrature
13338  * if self.stabilization is not None:
13339  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13340  * if elemQuadIsDict:
13341  * if elementQuadrature.has_key(I):
13342  */
13343  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 704, __pyx_L1_error)
13344  __Pyx_GOTREF(__pyx_t_7);
13345  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 704, __pyx_L1_error)
13346  __Pyx_GOTREF(__pyx_t_6);
13347  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13348  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
13349  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13350  __pyx_t_5 = NULL;
13351  } else {
13352  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 704, __pyx_L1_error)
13353  __Pyx_GOTREF(__pyx_t_7);
13354  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 704, __pyx_L1_error)
13355  }
13356  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13357  for (;;) {
13358  if (likely(!__pyx_t_5)) {
13359  if (likely(PyList_CheckExact(__pyx_t_7))) {
13360  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13361  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13362  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 704, __pyx_L1_error)
13363  #else
13364  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 704, __pyx_L1_error)
13365  __Pyx_GOTREF(__pyx_t_6);
13366  #endif
13367  } else {
13368  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13369  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13370  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 704, __pyx_L1_error)
13371  #else
13372  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 704, __pyx_L1_error)
13373  __Pyx_GOTREF(__pyx_t_6);
13374  #endif
13375  }
13376  } else {
13377  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
13378  if (unlikely(!__pyx_t_6)) {
13379  PyObject* exc_type = PyErr_Occurred();
13380  if (exc_type) {
13381  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13382  else __PYX_ERR(1, 704, __pyx_L1_error)
13383  }
13384  break;
13385  }
13386  __Pyx_GOTREF(__pyx_t_6);
13387  }
13388  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
13389  __pyx_t_6 = 0;
13390 
13391  /* "ADR.pyx":705
13392  * if self.stabilization is not None:
13393  * for I in self.coefficients.elementIntegralKeys:
13394  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13395  * if elementQuadrature.has_key(I):
13396  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13397  */
13398  __pyx_t_3 = (__pyx_v_elemQuadIsDict != 0);
13399  if (__pyx_t_3) {
13400 
13401  /* "ADR.pyx":706
13402  * for I in self.coefficients.elementIntegralKeys:
13403  * if elemQuadIsDict:
13404  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13405  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13406  * else:
13407  */
13408  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 706, __pyx_L1_error)
13409  __Pyx_GOTREF(__pyx_t_11);
13410  __pyx_t_2 = NULL;
13411  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
13412  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
13413  if (likely(__pyx_t_2)) {
13414  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
13415  __Pyx_INCREF(__pyx_t_2);
13416  __Pyx_INCREF(function);
13417  __Pyx_DECREF_SET(__pyx_t_11, function);
13418  }
13419  }
13420  __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_v_I) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_I);
13421  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13422  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 706, __pyx_L1_error)
13423  __Pyx_GOTREF(__pyx_t_6);
13424  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13425  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 706, __pyx_L1_error)
13426  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13427  if (__pyx_t_3) {
13428 
13429  /* "ADR.pyx":707
13430  * if elemQuadIsDict:
13431  * if elementQuadrature.has_key(I):
13432  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I] # <<<<<<<<<<<<<<
13433  * else:
13434  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
13435  */
13436  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 707, __pyx_L1_error)
13437  __Pyx_GOTREF(__pyx_t_6);
13438  __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 707, __pyx_L1_error)
13439  __Pyx_GOTREF(__pyx_t_11);
13440  __pyx_t_2 = PyNumber_Add(__pyx_tuple__6, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 707, __pyx_L1_error)
13441  __Pyx_GOTREF(__pyx_t_2);
13442  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13443  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(1, 707, __pyx_L1_error)
13444  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13445  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13446 
13447  /* "ADR.pyx":706
13448  * for I in self.coefficients.elementIntegralKeys:
13449  * if elemQuadIsDict:
13450  * if elementQuadrature.has_key(I): # <<<<<<<<<<<<<<
13451  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13452  * else:
13453  */
13454  goto __pyx_L62;
13455  }
13456 
13457  /* "ADR.pyx":709
13458  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13459  * else:
13460  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13461  * else:
13462  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13463  */
13464  /*else*/ {
13465  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 709, __pyx_L1_error)
13466  __Pyx_GOTREF(__pyx_t_6);
13467  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 709, __pyx_L1_error)
13468  __Pyx_GOTREF(__pyx_t_2);
13469  __pyx_t_11 = PyNumber_Add(__pyx_tuple__6, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 709, __pyx_L1_error)
13470  __Pyx_GOTREF(__pyx_t_11);
13471  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13472  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_11, __pyx_t_6) < 0)) __PYX_ERR(1, 709, __pyx_L1_error)
13473  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13474  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13475  }
13476  __pyx_L62:;
13477 
13478  /* "ADR.pyx":705
13479  * if self.stabilization is not None:
13480  * for I in self.coefficients.elementIntegralKeys:
13481  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13482  * if elementQuadrature.has_key(I):
13483  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I]
13484  */
13485  goto __pyx_L61;
13486  }
13487 
13488  /* "ADR.pyx":711
13489  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
13490  * else:
13491  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature # <<<<<<<<<<<<<<
13492  * if self.shockCapturing is not None:
13493  * for ci in self.shockCapturing.components:
13494  */
13495  /*else*/ {
13496  __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 711, __pyx_L1_error)
13497  __Pyx_GOTREF(__pyx_t_6);
13498  __pyx_t_11 = PyNumber_Add(__pyx_tuple__6, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 711, __pyx_L1_error)
13499  __Pyx_GOTREF(__pyx_t_11);
13500  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13501  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_11, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(1, 711, __pyx_L1_error)
13502  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13503  }
13504  __pyx_L61:;
13505 
13506  /* "ADR.pyx":704
13507  * elementQuadratureDict[I] = elementQuadrature
13508  * if self.stabilization is not None:
13509  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13510  * if elemQuadIsDict:
13511  * if elementQuadrature.has_key(I):
13512  */
13513  }
13514  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13515 
13516  /* "ADR.pyx":703
13517  * for I in self.coefficients.elementIntegralKeys:
13518  * elementQuadratureDict[I] = elementQuadrature
13519  * if self.stabilization is not None: # <<<<<<<<<<<<<<
13520  * for I in self.coefficients.elementIntegralKeys:
13521  * if elemQuadIsDict:
13522  */
13523  }
13524 
13525  /* "ADR.pyx":712
13526  * else:
13527  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13528  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
13529  * for ci in self.shockCapturing.components:
13530  * if elemQuadIsDict:
13531  */
13532  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 712, __pyx_L1_error)
13533  __Pyx_GOTREF(__pyx_t_7);
13534  __pyx_t_3 = (__pyx_t_7 != Py_None);
13535  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13536  __pyx_t_8 = (__pyx_t_3 != 0);
13537  if (__pyx_t_8) {
13538 
13539  /* "ADR.pyx":713
13540  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13541  * if self.shockCapturing is not None:
13542  * for ci in self.shockCapturing.components: # <<<<<<<<<<<<<<
13543  * if elemQuadIsDict:
13544  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13545  */
13546  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 713, __pyx_L1_error)
13547  __Pyx_GOTREF(__pyx_t_7);
13548  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_components); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 713, __pyx_L1_error)
13549  __Pyx_GOTREF(__pyx_t_11);
13550  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13551  if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
13552  __pyx_t_7 = __pyx_t_11; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
13553  __pyx_t_5 = NULL;
13554  } else {
13555  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 713, __pyx_L1_error)
13556  __Pyx_GOTREF(__pyx_t_7);
13557  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 713, __pyx_L1_error)
13558  }
13559  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13560  for (;;) {
13561  if (likely(!__pyx_t_5)) {
13562  if (likely(PyList_CheckExact(__pyx_t_7))) {
13563  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
13564  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13565  __pyx_t_11 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 713, __pyx_L1_error)
13566  #else
13567  __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 713, __pyx_L1_error)
13568  __Pyx_GOTREF(__pyx_t_11);
13569  #endif
13570  } else {
13571  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
13572  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13573  __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 713, __pyx_L1_error)
13574  #else
13575  __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 713, __pyx_L1_error)
13576  __Pyx_GOTREF(__pyx_t_11);
13577  #endif
13578  }
13579  } else {
13580  __pyx_t_11 = __pyx_t_5(__pyx_t_7);
13581  if (unlikely(!__pyx_t_11)) {
13582  PyObject* exc_type = PyErr_Occurred();
13583  if (exc_type) {
13584  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13585  else __PYX_ERR(1, 713, __pyx_L1_error)
13586  }
13587  break;
13588  }
13589  __Pyx_GOTREF(__pyx_t_11);
13590  }
13591  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_11);
13592  __pyx_t_11 = 0;
13593 
13594  /* "ADR.pyx":714
13595  * if self.shockCapturing is not None:
13596  * for ci in self.shockCapturing.components:
13597  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13598  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13599  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13600  */
13601  __pyx_t_8 = (__pyx_v_elemQuadIsDict != 0);
13602  if (__pyx_t_8) {
13603 
13604  /* "ADR.pyx":715
13605  * for ci in self.shockCapturing.components:
13606  * if elemQuadIsDict:
13607  * if elementQuadrature.has_key(('numDiff',ci,ci)): # <<<<<<<<<<<<<<
13608  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13609  * else:
13610  */
13611  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 715, __pyx_L1_error)
13612  __Pyx_GOTREF(__pyx_t_6);
13613  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 715, __pyx_L1_error)
13614  __Pyx_GOTREF(__pyx_t_2);
13615  __Pyx_INCREF(__pyx_n_s_numDiff);
13616  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13617  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_numDiff);
13618  __Pyx_INCREF(__pyx_v_ci);
13619  __Pyx_GIVEREF(__pyx_v_ci);
13620  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
13621  __Pyx_INCREF(__pyx_v_ci);
13622  __Pyx_GIVEREF(__pyx_v_ci);
13623  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ci);
13624  __pyx_t_1 = NULL;
13625  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
13626  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
13627  if (likely(__pyx_t_1)) {
13628  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13629  __Pyx_INCREF(__pyx_t_1);
13630  __Pyx_INCREF(function);
13631  __Pyx_DECREF_SET(__pyx_t_6, function);
13632  }
13633  }
13634  __pyx_t_11 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2);
13635  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13636  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13637  if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 715, __pyx_L1_error)
13638  __Pyx_GOTREF(__pyx_t_11);
13639  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13640  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 715, __pyx_L1_error)
13641  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13642  if (__pyx_t_8) {
13643 
13644  /* "ADR.pyx":716
13645  * if elemQuadIsDict:
13646  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13647  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)] # <<<<<<<<<<<<<<
13648  * else:
13649  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default']
13650  */
13651  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 716, __pyx_L1_error)
13652  __Pyx_GOTREF(__pyx_t_11);
13653  __Pyx_INCREF(__pyx_n_s_numDiff);
13654  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13655  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_numDiff);
13656  __Pyx_INCREF(__pyx_v_ci);
13657  __Pyx_GIVEREF(__pyx_v_ci);
13658  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ci);
13659  __Pyx_INCREF(__pyx_v_ci);
13660  __Pyx_GIVEREF(__pyx_v_ci);
13661  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_ci);
13662  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_elementQuadrature, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 716, __pyx_L1_error)
13663  __Pyx_GOTREF(__pyx_t_6);
13664  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13665  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 716, __pyx_L1_error)
13666  __Pyx_GOTREF(__pyx_t_11);
13667  __Pyx_INCREF(__pyx_n_s_numDiff);
13668  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13669  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_numDiff);
13670  __Pyx_INCREF(__pyx_v_ci);
13671  __Pyx_GIVEREF(__pyx_v_ci);
13672  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ci);
13673  __Pyx_INCREF(__pyx_v_ci);
13674  __Pyx_GIVEREF(__pyx_v_ci);
13675  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_ci);
13676  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_11, __pyx_t_6) < 0)) __PYX_ERR(1, 716, __pyx_L1_error)
13677  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13678  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13679 
13680  /* "ADR.pyx":715
13681  * for ci in self.shockCapturing.components:
13682  * if elemQuadIsDict:
13683  * if elementQuadrature.has_key(('numDiff',ci,ci)): # <<<<<<<<<<<<<<
13684  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13685  * else:
13686  */
13687  goto __pyx_L67;
13688  }
13689 
13690  /* "ADR.pyx":718
13691  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13692  * else:
13693  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default'] # <<<<<<<<<<<<<<
13694  * else:
13695  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13696  */
13697  /*else*/ {
13698  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_elementQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 718, __pyx_L1_error)
13699  __Pyx_GOTREF(__pyx_t_6);
13700  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 718, __pyx_L1_error)
13701  __Pyx_GOTREF(__pyx_t_11);
13702  __Pyx_INCREF(__pyx_n_s_numDiff);
13703  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13704  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_numDiff);
13705  __Pyx_INCREF(__pyx_v_ci);
13706  __Pyx_GIVEREF(__pyx_v_ci);
13707  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ci);
13708  __Pyx_INCREF(__pyx_v_ci);
13709  __Pyx_GIVEREF(__pyx_v_ci);
13710  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_ci);
13711  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_11, __pyx_t_6) < 0)) __PYX_ERR(1, 718, __pyx_L1_error)
13712  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13713  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13714  }
13715  __pyx_L67:;
13716 
13717  /* "ADR.pyx":714
13718  * if self.shockCapturing is not None:
13719  * for ci in self.shockCapturing.components:
13720  * if elemQuadIsDict: # <<<<<<<<<<<<<<
13721  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13722  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature[('numDiff',ci,ci)]
13723  */
13724  goto __pyx_L66;
13725  }
13726 
13727  /* "ADR.pyx":720
13728  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature['default']
13729  * else:
13730  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature # <<<<<<<<<<<<<<
13731  * if massLumping:
13732  * for ci in self.coefficients.mass.keys():
13733  */
13734  /*else*/ {
13735  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 720, __pyx_L1_error)
13736  __Pyx_GOTREF(__pyx_t_6);
13737  __Pyx_INCREF(__pyx_n_s_numDiff);
13738  __Pyx_GIVEREF(__pyx_n_s_numDiff);
13739  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_numDiff);
13740  __Pyx_INCREF(__pyx_v_ci);
13741  __Pyx_GIVEREF(__pyx_v_ci);
13742  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
13743  __Pyx_INCREF(__pyx_v_ci);
13744  __Pyx_GIVEREF(__pyx_v_ci);
13745  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ci);
13746  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_6, __pyx_v_elementQuadrature) < 0)) __PYX_ERR(1, 720, __pyx_L1_error)
13747  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13748  }
13749  __pyx_L66:;
13750 
13751  /* "ADR.pyx":713
13752  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13753  * if self.shockCapturing is not None:
13754  * for ci in self.shockCapturing.components: # <<<<<<<<<<<<<<
13755  * if elemQuadIsDict:
13756  * if elementQuadrature.has_key(('numDiff',ci,ci)):
13757  */
13758  }
13759  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13760 
13761  /* "ADR.pyx":712
13762  * else:
13763  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature
13764  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
13765  * for ci in self.shockCapturing.components:
13766  * if elemQuadIsDict:
13767  */
13768  }
13769 
13770  /* "ADR.pyx":721
13771  * else:
13772  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13773  * if massLumping: # <<<<<<<<<<<<<<
13774  * for ci in self.coefficients.mass.keys():
13775  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13776  */
13777  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_massLumping); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 721, __pyx_L1_error)
13778  if (__pyx_t_8) {
13779 
13780  /* "ADR.pyx":722
13781  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13782  * if massLumping:
13783  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
13784  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13785  * for I in self.coefficients.elementIntegralKeys:
13786  */
13787  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 722, __pyx_L1_error)
13788  __Pyx_GOTREF(__pyx_t_6);
13789  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_mass); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 722, __pyx_L1_error)
13790  __Pyx_GOTREF(__pyx_t_11);
13791  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13792  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 722, __pyx_L1_error)
13793  __Pyx_GOTREF(__pyx_t_6);
13794  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13795  __pyx_t_11 = NULL;
13796  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
13797  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
13798  if (likely(__pyx_t_11)) {
13799  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13800  __Pyx_INCREF(__pyx_t_11);
13801  __Pyx_INCREF(function);
13802  __Pyx_DECREF_SET(__pyx_t_6, function);
13803  }
13804  }
13805  __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
13806  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
13807  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 722, __pyx_L1_error)
13808  __Pyx_GOTREF(__pyx_t_7);
13809  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13810  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
13811  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
13812  __pyx_t_5 = NULL;
13813  } else {
13814  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 722, __pyx_L1_error)
13815  __Pyx_GOTREF(__pyx_t_6);
13816  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 722, __pyx_L1_error)
13817  }
13818  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13819  for (;;) {
13820  if (likely(!__pyx_t_5)) {
13821  if (likely(PyList_CheckExact(__pyx_t_6))) {
13822  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
13823  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13824  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 722, __pyx_L1_error)
13825  #else
13826  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 722, __pyx_L1_error)
13827  __Pyx_GOTREF(__pyx_t_7);
13828  #endif
13829  } else {
13830  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
13831  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13832  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 722, __pyx_L1_error)
13833  #else
13834  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 722, __pyx_L1_error)
13835  __Pyx_GOTREF(__pyx_t_7);
13836  #endif
13837  }
13838  } else {
13839  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
13840  if (unlikely(!__pyx_t_7)) {
13841  PyObject* exc_type = PyErr_Occurred();
13842  if (exc_type) {
13843  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13844  else __PYX_ERR(1, 722, __pyx_L1_error)
13845  }
13846  break;
13847  }
13848  __Pyx_GOTREF(__pyx_t_7);
13849  }
13850  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_7);
13851  __pyx_t_7 = 0;
13852 
13853  /* "ADR.pyx":723
13854  * if massLumping:
13855  * for ci in self.coefficients.mass.keys():
13856  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
13857  * for I in self.coefficients.elementIntegralKeys:
13858  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13859  */
13860  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 723, __pyx_L1_error)
13861  __Pyx_GOTREF(__pyx_t_11);
13862  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 723, __pyx_L1_error)
13863  __Pyx_GOTREF(__pyx_t_2);
13864  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13865  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 723, __pyx_L1_error)
13866  __Pyx_GOTREF(__pyx_t_11);
13867  __pyx_t_1 = NULL;
13868  __pyx_t_14 = 0;
13869  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
13870  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
13871  if (likely(__pyx_t_1)) {
13872  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13873  __Pyx_INCREF(__pyx_t_1);
13874  __Pyx_INCREF(function);
13875  __Pyx_DECREF_SET(__pyx_t_2, function);
13876  __pyx_t_14 = 1;
13877  }
13878  }
13879  #if CYTHON_FAST_PYCALL
13880  if (PyFunction_Check(__pyx_t_2)) {
13881  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_11, __pyx_int_1};
13882  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 723, __pyx_L1_error)
13883  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13884  __Pyx_GOTREF(__pyx_t_7);
13885  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13886  } else
13887  #endif
13888  #if CYTHON_FAST_PYCCALL
13889  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13890  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_11, __pyx_int_1};
13891  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 723, __pyx_L1_error)
13892  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13893  __Pyx_GOTREF(__pyx_t_7);
13894  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13895  } else
13896  #endif
13897  {
13898  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 723, __pyx_L1_error)
13899  __Pyx_GOTREF(__pyx_t_15);
13900  if (__pyx_t_1) {
13901  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __pyx_t_1 = NULL;
13902  }
13903  __Pyx_GIVEREF(__pyx_t_11);
13904  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_11);
13905  __Pyx_INCREF(__pyx_int_1);
13906  __Pyx_GIVEREF(__pyx_int_1);
13907  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_int_1);
13908  __pyx_t_11 = 0;
13909  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 723, __pyx_L1_error)
13910  __Pyx_GOTREF(__pyx_t_7);
13911  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
13912  }
13913  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13914  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 723, __pyx_L1_error)
13915  __Pyx_GOTREF(__pyx_t_2);
13916  __Pyx_INCREF(__pyx_n_s_m);
13917  __Pyx_GIVEREF(__pyx_n_s_m);
13918  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_m);
13919  __Pyx_INCREF(__pyx_v_ci);
13920  __Pyx_GIVEREF(__pyx_v_ci);
13921  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
13922  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_t_7) < 0)) __PYX_ERR(1, 723, __pyx_L1_error)
13923  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13924  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13925 
13926  /* "ADR.pyx":722
13927  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
13928  * if massLumping:
13929  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
13930  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13931  * for I in self.coefficients.elementIntegralKeys:
13932  */
13933  }
13934  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13935 
13936  /* "ADR.pyx":724
13937  * for ci in self.coefficients.mass.keys():
13938  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13939  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
13940  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13941  * if reactionLumping:
13942  */
13943  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 724, __pyx_L1_error)
13944  __Pyx_GOTREF(__pyx_t_6);
13945  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 724, __pyx_L1_error)
13946  __Pyx_GOTREF(__pyx_t_7);
13947  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13948  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
13949  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
13950  __pyx_t_5 = NULL;
13951  } else {
13952  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 724, __pyx_L1_error)
13953  __Pyx_GOTREF(__pyx_t_6);
13954  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 724, __pyx_L1_error)
13955  }
13956  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13957  for (;;) {
13958  if (likely(!__pyx_t_5)) {
13959  if (likely(PyList_CheckExact(__pyx_t_6))) {
13960  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
13961  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13962  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 724, __pyx_L1_error)
13963  #else
13964  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 724, __pyx_L1_error)
13965  __Pyx_GOTREF(__pyx_t_7);
13966  #endif
13967  } else {
13968  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
13969  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13970  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 724, __pyx_L1_error)
13971  #else
13972  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 724, __pyx_L1_error)
13973  __Pyx_GOTREF(__pyx_t_7);
13974  #endif
13975  }
13976  } else {
13977  __pyx_t_7 = __pyx_t_5(__pyx_t_6);
13978  if (unlikely(!__pyx_t_7)) {
13979  PyObject* exc_type = PyErr_Occurred();
13980  if (exc_type) {
13981  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13982  else __PYX_ERR(1, 724, __pyx_L1_error)
13983  }
13984  break;
13985  }
13986  __Pyx_GOTREF(__pyx_t_7);
13987  }
13988  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_7);
13989  __pyx_t_7 = 0;
13990 
13991  /* "ADR.pyx":725
13992  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
13993  * for I in self.coefficients.elementIntegralKeys:
13994  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
13995  * if reactionLumping:
13996  * for ci in self.coefficients.mass.keys():
13997  */
13998  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 725, __pyx_L1_error)
13999  __Pyx_GOTREF(__pyx_t_2);
14000  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 725, __pyx_L1_error)
14001  __Pyx_GOTREF(__pyx_t_15);
14002  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14003  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 725, __pyx_L1_error)
14004  __Pyx_GOTREF(__pyx_t_2);
14005  __pyx_t_11 = NULL;
14006  __pyx_t_14 = 0;
14007  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
14008  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_15);
14009  if (likely(__pyx_t_11)) {
14010  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
14011  __Pyx_INCREF(__pyx_t_11);
14012  __Pyx_INCREF(function);
14013  __Pyx_DECREF_SET(__pyx_t_15, function);
14014  __pyx_t_14 = 1;
14015  }
14016  }
14017  #if CYTHON_FAST_PYCALL
14018  if (PyFunction_Check(__pyx_t_15)) {
14019  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_2, __pyx_int_1};
14020  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 725, __pyx_L1_error)
14021  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
14022  __Pyx_GOTREF(__pyx_t_7);
14023  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14024  } else
14025  #endif
14026  #if CYTHON_FAST_PYCCALL
14027  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
14028  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_2, __pyx_int_1};
14029  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 725, __pyx_L1_error)
14030  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
14031  __Pyx_GOTREF(__pyx_t_7);
14032  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14033  } else
14034  #endif
14035  {
14036  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 725, __pyx_L1_error)
14037  __Pyx_GOTREF(__pyx_t_1);
14038  if (__pyx_t_11) {
14039  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11); __pyx_t_11 = NULL;
14040  }
14041  __Pyx_GIVEREF(__pyx_t_2);
14042  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_2);
14043  __Pyx_INCREF(__pyx_int_1);
14044  __Pyx_GIVEREF(__pyx_int_1);
14045  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_int_1);
14046  __pyx_t_2 = 0;
14047  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 725, __pyx_L1_error)
14048  __Pyx_GOTREF(__pyx_t_7);
14049  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14050  }
14051  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14052  __pyx_t_15 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 725, __pyx_L1_error)
14053  __Pyx_GOTREF(__pyx_t_15);
14054  __pyx_t_1 = PyNumber_Add(__pyx_tuple__6, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 725, __pyx_L1_error)
14055  __Pyx_GOTREF(__pyx_t_1);
14056  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14057  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_1, __pyx_t_7) < 0)) __PYX_ERR(1, 725, __pyx_L1_error)
14058  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14059  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14060 
14061  /* "ADR.pyx":724
14062  * for ci in self.coefficients.mass.keys():
14063  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14064  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14065  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14066  * if reactionLumping:
14067  */
14068  }
14069  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14070 
14071  /* "ADR.pyx":721
14072  * else:
14073  * elementQuadratureDict[('numDiff',ci,ci)] = elementQuadrature
14074  * if massLumping: # <<<<<<<<<<<<<<
14075  * for ci in self.coefficients.mass.keys():
14076  * elementQuadratureDict[('m',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14077  */
14078  }
14079 
14080  /* "ADR.pyx":726
14081  * for I in self.coefficients.elementIntegralKeys:
14082  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14083  * if reactionLumping: # <<<<<<<<<<<<<<
14084  * for ci in self.coefficients.mass.keys():
14085  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14086  */
14087  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_reactionLumping); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 726, __pyx_L1_error)
14088  if (__pyx_t_8) {
14089 
14090  /* "ADR.pyx":727
14091  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14092  * if reactionLumping:
14093  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14094  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14095  * for I in self.coefficients.elementIntegralKeys:
14096  */
14097  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 727, __pyx_L1_error)
14098  __Pyx_GOTREF(__pyx_t_7);
14099  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_mass); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 727, __pyx_L1_error)
14100  __Pyx_GOTREF(__pyx_t_1);
14101  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14102  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 727, __pyx_L1_error)
14103  __Pyx_GOTREF(__pyx_t_7);
14104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14105  __pyx_t_1 = NULL;
14106  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
14107  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
14108  if (likely(__pyx_t_1)) {
14109  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
14110  __Pyx_INCREF(__pyx_t_1);
14111  __Pyx_INCREF(function);
14112  __Pyx_DECREF_SET(__pyx_t_7, function);
14113  }
14114  }
14115  __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
14116  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14117  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 727, __pyx_L1_error)
14118  __Pyx_GOTREF(__pyx_t_6);
14119  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14120  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14121  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14122  __pyx_t_5 = NULL;
14123  } else {
14124  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 727, __pyx_L1_error)
14125  __Pyx_GOTREF(__pyx_t_7);
14126  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 727, __pyx_L1_error)
14127  }
14128  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14129  for (;;) {
14130  if (likely(!__pyx_t_5)) {
14131  if (likely(PyList_CheckExact(__pyx_t_7))) {
14132  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14133  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14134  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 727, __pyx_L1_error)
14135  #else
14136  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 727, __pyx_L1_error)
14137  __Pyx_GOTREF(__pyx_t_6);
14138  #endif
14139  } else {
14140  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14141  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14142  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 727, __pyx_L1_error)
14143  #else
14144  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 727, __pyx_L1_error)
14145  __Pyx_GOTREF(__pyx_t_6);
14146  #endif
14147  }
14148  } else {
14149  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14150  if (unlikely(!__pyx_t_6)) {
14151  PyObject* exc_type = PyErr_Occurred();
14152  if (exc_type) {
14153  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14154  else __PYX_ERR(1, 727, __pyx_L1_error)
14155  }
14156  break;
14157  }
14158  __Pyx_GOTREF(__pyx_t_6);
14159  }
14160  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_6);
14161  __pyx_t_6 = 0;
14162 
14163  /* "ADR.pyx":728
14164  * if reactionLumping:
14165  * for ci in self.coefficients.mass.keys():
14166  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14167  * for I in self.coefficients.elementIntegralKeys:
14168  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14169  */
14170  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 728, __pyx_L1_error)
14171  __Pyx_GOTREF(__pyx_t_1);
14172  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 728, __pyx_L1_error)
14173  __Pyx_GOTREF(__pyx_t_15);
14174  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14175  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 728, __pyx_L1_error)
14176  __Pyx_GOTREF(__pyx_t_1);
14177  __pyx_t_2 = NULL;
14178  __pyx_t_14 = 0;
14179  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
14180  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15);
14181  if (likely(__pyx_t_2)) {
14182  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
14183  __Pyx_INCREF(__pyx_t_2);
14184  __Pyx_INCREF(function);
14185  __Pyx_DECREF_SET(__pyx_t_15, function);
14186  __pyx_t_14 = 1;
14187  }
14188  }
14189  #if CYTHON_FAST_PYCALL
14190  if (PyFunction_Check(__pyx_t_15)) {
14191  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_int_1};
14192  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 728, __pyx_L1_error)
14193  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14194  __Pyx_GOTREF(__pyx_t_6);
14195  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14196  } else
14197  #endif
14198  #if CYTHON_FAST_PYCCALL
14199  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
14200  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_int_1};
14201  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 728, __pyx_L1_error)
14202  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14203  __Pyx_GOTREF(__pyx_t_6);
14204  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14205  } else
14206  #endif
14207  {
14208  __pyx_t_11 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 728, __pyx_L1_error)
14209  __Pyx_GOTREF(__pyx_t_11);
14210  if (__pyx_t_2) {
14211  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
14212  }
14213  __Pyx_GIVEREF(__pyx_t_1);
14214  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_14, __pyx_t_1);
14215  __Pyx_INCREF(__pyx_int_1);
14216  __Pyx_GIVEREF(__pyx_int_1);
14217  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_14, __pyx_int_1);
14218  __pyx_t_1 = 0;
14219  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 728, __pyx_L1_error)
14220  __Pyx_GOTREF(__pyx_t_6);
14221  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14222  }
14223  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14224  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 728, __pyx_L1_error)
14225  __Pyx_GOTREF(__pyx_t_15);
14226  __Pyx_INCREF(__pyx_n_s_r);
14227  __Pyx_GIVEREF(__pyx_n_s_r);
14228  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_r);
14229  __Pyx_INCREF(__pyx_v_ci);
14230  __Pyx_GIVEREF(__pyx_v_ci);
14231  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_v_ci);
14232  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_15, __pyx_t_6) < 0)) __PYX_ERR(1, 728, __pyx_L1_error)
14233  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14234  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14235 
14236  /* "ADR.pyx":727
14237  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14238  * if reactionLumping:
14239  * for ci in self.coefficients.mass.keys(): # <<<<<<<<<<<<<<
14240  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14241  * for I in self.coefficients.elementIntegralKeys:
14242  */
14243  }
14244  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14245 
14246  /* "ADR.pyx":729
14247  * for ci in self.coefficients.mass.keys():
14248  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14249  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14250  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14251  * elementBoundaryQuadratureDict={}
14252  */
14253  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 729, __pyx_L1_error)
14254  __Pyx_GOTREF(__pyx_t_7);
14255  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 729, __pyx_L1_error)
14256  __Pyx_GOTREF(__pyx_t_6);
14257  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14258  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14259  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14260  __pyx_t_5 = NULL;
14261  } else {
14262  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 729, __pyx_L1_error)
14263  __Pyx_GOTREF(__pyx_t_7);
14264  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 729, __pyx_L1_error)
14265  }
14266  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14267  for (;;) {
14268  if (likely(!__pyx_t_5)) {
14269  if (likely(PyList_CheckExact(__pyx_t_7))) {
14270  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14271  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14272  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 729, __pyx_L1_error)
14273  #else
14274  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 729, __pyx_L1_error)
14275  __Pyx_GOTREF(__pyx_t_6);
14276  #endif
14277  } else {
14278  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14279  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14280  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 729, __pyx_L1_error)
14281  #else
14282  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 729, __pyx_L1_error)
14283  __Pyx_GOTREF(__pyx_t_6);
14284  #endif
14285  }
14286  } else {
14287  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14288  if (unlikely(!__pyx_t_6)) {
14289  PyObject* exc_type = PyErr_Occurred();
14290  if (exc_type) {
14291  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14292  else __PYX_ERR(1, 729, __pyx_L1_error)
14293  }
14294  break;
14295  }
14296  __Pyx_GOTREF(__pyx_t_6);
14297  }
14298  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14299  __pyx_t_6 = 0;
14300 
14301  /* "ADR.pyx":730
14302  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14303  * for I in self.coefficients.elementIntegralKeys:
14304  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1) # <<<<<<<<<<<<<<
14305  * elementBoundaryQuadratureDict={}
14306  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14307  */
14308  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 730, __pyx_L1_error)
14309  __Pyx_GOTREF(__pyx_t_15);
14310  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_SimplexLobattoQuadrature); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 730, __pyx_L1_error)
14311  __Pyx_GOTREF(__pyx_t_11);
14312  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14313  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 730, __pyx_L1_error)
14314  __Pyx_GOTREF(__pyx_t_15);
14315  __pyx_t_1 = NULL;
14316  __pyx_t_14 = 0;
14317  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
14318  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
14319  if (likely(__pyx_t_1)) {
14320  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
14321  __Pyx_INCREF(__pyx_t_1);
14322  __Pyx_INCREF(function);
14323  __Pyx_DECREF_SET(__pyx_t_11, function);
14324  __pyx_t_14 = 1;
14325  }
14326  }
14327  #if CYTHON_FAST_PYCALL
14328  if (PyFunction_Check(__pyx_t_11)) {
14329  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_int_1};
14330  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 730, __pyx_L1_error)
14331  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14332  __Pyx_GOTREF(__pyx_t_6);
14333  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14334  } else
14335  #endif
14336  #if CYTHON_FAST_PYCCALL
14337  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
14338  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_int_1};
14339  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 730, __pyx_L1_error)
14340  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
14341  __Pyx_GOTREF(__pyx_t_6);
14342  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14343  } else
14344  #endif
14345  {
14346  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 730, __pyx_L1_error)
14347  __Pyx_GOTREF(__pyx_t_2);
14348  if (__pyx_t_1) {
14349  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
14350  }
14351  __Pyx_GIVEREF(__pyx_t_15);
14352  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_15);
14353  __Pyx_INCREF(__pyx_int_1);
14354  __Pyx_GIVEREF(__pyx_int_1);
14355  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_int_1);
14356  __pyx_t_15 = 0;
14357  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 730, __pyx_L1_error)
14358  __Pyx_GOTREF(__pyx_t_6);
14359  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14360  }
14361  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14362  __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_I, 1, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 730, __pyx_L1_error)
14363  __Pyx_GOTREF(__pyx_t_11);
14364  __pyx_t_2 = PyNumber_Add(__pyx_tuple__6, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 730, __pyx_L1_error)
14365  __Pyx_GOTREF(__pyx_t_2);
14366  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14367  if (unlikely(PyDict_SetItem(__pyx_v_elementQuadratureDict, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(1, 730, __pyx_L1_error)
14368  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14369  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14370 
14371  /* "ADR.pyx":729
14372  * for ci in self.coefficients.mass.keys():
14373  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14374  * for I in self.coefficients.elementIntegralKeys: # <<<<<<<<<<<<<<
14375  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14376  * elementBoundaryQuadratureDict={}
14377  */
14378  }
14379  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14380 
14381  /* "ADR.pyx":726
14382  * for I in self.coefficients.elementIntegralKeys:
14383  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14384  * if reactionLumping: # <<<<<<<<<<<<<<
14385  * for ci in self.coefficients.mass.keys():
14386  * elementQuadratureDict[('r',ci)] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14387  */
14388  }
14389 
14390  /* "ADR.pyx":731
14391  * for I in self.coefficients.elementIntegralKeys:
14392  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14393  * elementBoundaryQuadratureDict={} # <<<<<<<<<<<<<<
14394  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14395  * for I in self.coefficients.elementBoundaryIntegralKeys:
14396  */
14397  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 731, __pyx_L1_error)
14398  __Pyx_GOTREF(__pyx_t_7);
14399  __pyx_v_elementBoundaryQuadratureDict = ((PyObject*)__pyx_t_7);
14400  __pyx_t_7 = 0;
14401 
14402  /* "ADR.pyx":732
14403  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14404  * elementBoundaryQuadratureDict={}
14405  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually # <<<<<<<<<<<<<<
14406  * for I in self.coefficients.elementBoundaryIntegralKeys:
14407  * if elementBoundaryQuadrature.has_key(I):
14408  */
14409  __pyx_t_8 = PyDict_Check(__pyx_v_elementBoundaryQuadrature);
14410  __pyx_t_3 = (__pyx_t_8 != 0);
14411  if (__pyx_t_3) {
14412 
14413  /* "ADR.pyx":733
14414  * elementBoundaryQuadratureDict={}
14415  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14416  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14417  * if elementBoundaryQuadrature.has_key(I):
14418  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14419  */
14420  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 733, __pyx_L1_error)
14421  __Pyx_GOTREF(__pyx_t_7);
14422  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementBoundaryIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 733, __pyx_L1_error)
14423  __Pyx_GOTREF(__pyx_t_6);
14424  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14425  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14426  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14427  __pyx_t_5 = NULL;
14428  } else {
14429  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 733, __pyx_L1_error)
14430  __Pyx_GOTREF(__pyx_t_7);
14431  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 733, __pyx_L1_error)
14432  }
14433  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14434  for (;;) {
14435  if (likely(!__pyx_t_5)) {
14436  if (likely(PyList_CheckExact(__pyx_t_7))) {
14437  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14438  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14439  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 733, __pyx_L1_error)
14440  #else
14441  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 733, __pyx_L1_error)
14442  __Pyx_GOTREF(__pyx_t_6);
14443  #endif
14444  } else {
14445  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14446  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14447  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 733, __pyx_L1_error)
14448  #else
14449  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 733, __pyx_L1_error)
14450  __Pyx_GOTREF(__pyx_t_6);
14451  #endif
14452  }
14453  } else {
14454  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14455  if (unlikely(!__pyx_t_6)) {
14456  PyObject* exc_type = PyErr_Occurred();
14457  if (exc_type) {
14458  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14459  else __PYX_ERR(1, 733, __pyx_L1_error)
14460  }
14461  break;
14462  }
14463  __Pyx_GOTREF(__pyx_t_6);
14464  }
14465  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14466  __pyx_t_6 = 0;
14467 
14468  /* "ADR.pyx":734
14469  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14470  * for I in self.coefficients.elementBoundaryIntegralKeys:
14471  * if elementBoundaryQuadrature.has_key(I): # <<<<<<<<<<<<<<
14472  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14473  * else:
14474  */
14475  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_elementBoundaryQuadrature, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 734, __pyx_L1_error)
14476  __Pyx_GOTREF(__pyx_t_2);
14477  __pyx_t_11 = NULL;
14478  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
14479  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
14480  if (likely(__pyx_t_11)) {
14481  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14482  __Pyx_INCREF(__pyx_t_11);
14483  __Pyx_INCREF(function);
14484  __Pyx_DECREF_SET(__pyx_t_2, function);
14485  }
14486  }
14487  __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_I) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_I);
14488  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
14489  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 734, __pyx_L1_error)
14490  __Pyx_GOTREF(__pyx_t_6);
14491  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14492  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 734, __pyx_L1_error)
14493  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14494  if (__pyx_t_3) {
14495 
14496  /* "ADR.pyx":735
14497  * for I in self.coefficients.elementBoundaryIntegralKeys:
14498  * if elementBoundaryQuadrature.has_key(I):
14499  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I] # <<<<<<<<<<<<<<
14500  * else:
14501  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14502  */
14503  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_elementBoundaryQuadrature, __pyx_v_I); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 735, __pyx_L1_error)
14504  __Pyx_GOTREF(__pyx_t_6);
14505  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(1, 735, __pyx_L1_error)
14506  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14507 
14508  /* "ADR.pyx":734
14509  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14510  * for I in self.coefficients.elementBoundaryIntegralKeys:
14511  * if elementBoundaryQuadrature.has_key(I): # <<<<<<<<<<<<<<
14512  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14513  * else:
14514  */
14515  goto __pyx_L81;
14516  }
14517 
14518  /* "ADR.pyx":737
14519  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14520  * else:
14521  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default'] # <<<<<<<<<<<<<<
14522  * else:
14523  * for I in self.coefficients.elementBoundaryIntegralKeys:
14524  */
14525  /*else*/ {
14526  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_elementBoundaryQuadrature, __pyx_n_s_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 737, __pyx_L1_error)
14527  __Pyx_GOTREF(__pyx_t_6);
14528  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_t_6) < 0)) __PYX_ERR(1, 737, __pyx_L1_error)
14529  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14530  }
14531  __pyx_L81:;
14532 
14533  /* "ADR.pyx":733
14534  * elementBoundaryQuadratureDict={}
14535  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually
14536  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14537  * if elementBoundaryQuadrature.has_key(I):
14538  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature[I]
14539  */
14540  }
14541  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14542 
14543  /* "ADR.pyx":732
14544  * elementQuadratureDict[('stab',)+I[1:]] = Quadrature.SimplexLobattoQuadrature(self.nSpace_global,1)
14545  * elementBoundaryQuadratureDict={}
14546  * if isinstance(elementBoundaryQuadrature,dict): #set terms manually # <<<<<<<<<<<<<<
14547  * for I in self.coefficients.elementBoundaryIntegralKeys:
14548  * if elementBoundaryQuadrature.has_key(I):
14549  */
14550  goto __pyx_L78;
14551  }
14552 
14553  /* "ADR.pyx":739
14554  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14555  * else:
14556  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14557  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature
14558  * #
14559  */
14560  /*else*/ {
14561  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 739, __pyx_L1_error)
14562  __Pyx_GOTREF(__pyx_t_7);
14563  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_elementBoundaryIntegralKeys); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 739, __pyx_L1_error)
14564  __Pyx_GOTREF(__pyx_t_6);
14565  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14566  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
14567  __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
14568  __pyx_t_5 = NULL;
14569  } else {
14570  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 739, __pyx_L1_error)
14571  __Pyx_GOTREF(__pyx_t_7);
14572  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 739, __pyx_L1_error)
14573  }
14574  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14575  for (;;) {
14576  if (likely(!__pyx_t_5)) {
14577  if (likely(PyList_CheckExact(__pyx_t_7))) {
14578  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
14579  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14580  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 739, __pyx_L1_error)
14581  #else
14582  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 739, __pyx_L1_error)
14583  __Pyx_GOTREF(__pyx_t_6);
14584  #endif
14585  } else {
14586  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
14587  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14588  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 739, __pyx_L1_error)
14589  #else
14590  __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 739, __pyx_L1_error)
14591  __Pyx_GOTREF(__pyx_t_6);
14592  #endif
14593  }
14594  } else {
14595  __pyx_t_6 = __pyx_t_5(__pyx_t_7);
14596  if (unlikely(!__pyx_t_6)) {
14597  PyObject* exc_type = PyErr_Occurred();
14598  if (exc_type) {
14599  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14600  else __PYX_ERR(1, 739, __pyx_L1_error)
14601  }
14602  break;
14603  }
14604  __Pyx_GOTREF(__pyx_t_6);
14605  }
14606  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_6);
14607  __pyx_t_6 = 0;
14608 
14609  /* "ADR.pyx":740
14610  * else:
14611  * for I in self.coefficients.elementBoundaryIntegralKeys:
14612  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature # <<<<<<<<<<<<<<
14613  * #
14614  * # find the union of all element quadrature points and
14615  */
14616  if (unlikely(PyDict_SetItem(__pyx_v_elementBoundaryQuadratureDict, __pyx_v_I, __pyx_v_elementBoundaryQuadrature) < 0)) __PYX_ERR(1, 740, __pyx_L1_error)
14617 
14618  /* "ADR.pyx":739
14619  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature['default']
14620  * else:
14621  * for I in self.coefficients.elementBoundaryIntegralKeys: # <<<<<<<<<<<<<<
14622  * elementBoundaryQuadratureDict[I] = elementBoundaryQuadrature
14623  * #
14624  */
14625  }
14626  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14627  }
14628  __pyx_L78:;
14629 
14630  /* "ADR.pyx":747
14631  * #mwf include tag telling me which indices are which quadrature rule?
14632  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14633  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict) # <<<<<<<<<<<<<<
14634  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14635  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14636  */
14637  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 747, __pyx_L1_error)
14638  __Pyx_GOTREF(__pyx_t_6);
14639  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_buildUnion); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error)
14640  __Pyx_GOTREF(__pyx_t_2);
14641  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14642  __pyx_t_6 = NULL;
14643  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
14644  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
14645  if (likely(__pyx_t_6)) {
14646  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14647  __Pyx_INCREF(__pyx_t_6);
14648  __Pyx_INCREF(function);
14649  __Pyx_DECREF_SET(__pyx_t_2, function);
14650  }
14651  }
14652  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_elementQuadratureDict) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_elementQuadratureDict);
14653  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14654  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error)
14655  __Pyx_GOTREF(__pyx_t_7);
14656  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14657  if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
14658  PyObject* sequence = __pyx_t_7;
14659  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
14660  if (unlikely(size != 3)) {
14661  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
14662  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
14663  __PYX_ERR(1, 746, __pyx_L1_error)
14664  }
14665  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14666  if (likely(PyTuple_CheckExact(sequence))) {
14667  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
14668  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
14669  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2);
14670  } else {
14671  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
14672  __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
14673  __pyx_t_11 = PyList_GET_ITEM(sequence, 2);
14674  }
14675  __Pyx_INCREF(__pyx_t_2);
14676  __Pyx_INCREF(__pyx_t_6);
14677  __Pyx_INCREF(__pyx_t_11);
14678  #else
14679  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 746, __pyx_L1_error)
14680  __Pyx_GOTREF(__pyx_t_2);
14681  __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 746, __pyx_L1_error)
14682  __Pyx_GOTREF(__pyx_t_6);
14683  __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 746, __pyx_L1_error)
14684  __Pyx_GOTREF(__pyx_t_11);
14685  #endif
14686  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14687  } else {
14688  Py_ssize_t index = -1;
14689  __pyx_t_15 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 746, __pyx_L1_error)
14690  __Pyx_GOTREF(__pyx_t_15);
14691  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14692  __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
14693  index = 0; __pyx_t_2 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_2)) goto __pyx_L84_unpacking_failed;
14694  __Pyx_GOTREF(__pyx_t_2);
14695  index = 1; __pyx_t_6 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L84_unpacking_failed;
14696  __Pyx_GOTREF(__pyx_t_6);
14697  index = 2; __pyx_t_11 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_11)) goto __pyx_L84_unpacking_failed;
14698  __Pyx_GOTREF(__pyx_t_11);
14699  if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 3) < 0) __PYX_ERR(1, 746, __pyx_L1_error)
14700  __pyx_t_16 = NULL;
14701  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14702  goto __pyx_L85_unpacking_done;
14703  __pyx_L84_unpacking_failed:;
14704  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14705  __pyx_t_16 = NULL;
14706  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
14707  __PYX_ERR(1, 746, __pyx_L1_error)
14708  __pyx_L85_unpacking_done:;
14709  }
14710 
14711  /* "ADR.pyx":746
14712  * # weight at each point in the union
14713  * #mwf include tag telling me which indices are which quadrature rule?
14714  * (self.elementQuadraturePoints,self.elementQuadratureWeights, # <<<<<<<<<<<<<<
14715  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14716  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14717  */
14718  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints, __pyx_t_2) < 0) __PYX_ERR(1, 746, __pyx_L1_error)
14719  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14720  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights, __pyx_t_6) < 0) __PYX_ERR(1, 746, __pyx_L1_error)
14721  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14722 
14723  /* "ADR.pyx":747
14724  * #mwf include tag telling me which indices are which quadrature rule?
14725  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14726  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict) # <<<<<<<<<<<<<<
14727  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14728  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14729  */
14730  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureRuleIndeces, __pyx_t_11) < 0) __PYX_ERR(1, 747, __pyx_L1_error)
14731  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14732 
14733  /* "ADR.pyx":748
14734  * (self.elementQuadraturePoints,self.elementQuadratureWeights,
14735  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14736  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0] # <<<<<<<<<<<<<<
14737  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global
14738  * #
14739  */
14740  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 748, __pyx_L1_error)
14741  __Pyx_GOTREF(__pyx_t_7);
14742  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 748, __pyx_L1_error)
14743  __Pyx_GOTREF(__pyx_t_11);
14744  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14745  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 748, __pyx_L1_error)
14746  __Pyx_GOTREF(__pyx_t_7);
14747  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14748  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element, __pyx_t_7) < 0) __PYX_ERR(1, 748, __pyx_L1_error)
14749  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14750 
14751  /* "ADR.pyx":749
14752  * self.elementQuadratureRuleIndeces) = Quadrature.buildUnion(elementQuadratureDict)
14753  * self.nQuadraturePoints_element = self.elementQuadraturePoints.shape[0]
14754  * self.nQuadraturePoints_global = self.nQuadraturePoints_element*self.mesh.nElements_global # <<<<<<<<<<<<<<
14755  * #
14756  * #Repeat the same thing for the element boundary quadrature
14757  */
14758  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 749, __pyx_L1_error)
14759  __Pyx_GOTREF(__pyx_t_7);
14760  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 749, __pyx_L1_error)
14761  __Pyx_GOTREF(__pyx_t_11);
14762  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 749, __pyx_L1_error)
14763  __Pyx_GOTREF(__pyx_t_6);
14764  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14765  __pyx_t_11 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 749, __pyx_L1_error)
14766  __Pyx_GOTREF(__pyx_t_11);
14767  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14768  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14769  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_global, __pyx_t_11) < 0) __PYX_ERR(1, 749, __pyx_L1_error)
14770  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14771 
14772  /* "ADR.pyx":755
14773  * (self.elementBoundaryQuadraturePoints,
14774  * self.elementBoundaryQuadratureWeights,
14775  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict) # <<<<<<<<<<<<<<
14776  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14777  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
14778  */
14779  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 755, __pyx_L1_error)
14780  __Pyx_GOTREF(__pyx_t_6);
14781  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_buildUnion); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 755, __pyx_L1_error)
14782  __Pyx_GOTREF(__pyx_t_7);
14783  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14784  __pyx_t_6 = NULL;
14785  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
14786  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
14787  if (likely(__pyx_t_6)) {
14788  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
14789  __Pyx_INCREF(__pyx_t_6);
14790  __Pyx_INCREF(function);
14791  __Pyx_DECREF_SET(__pyx_t_7, function);
14792  }
14793  }
14794  __pyx_t_11 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_elementBoundaryQuadratureDict) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_elementBoundaryQuadratureDict);
14795  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14796  if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 755, __pyx_L1_error)
14797  __Pyx_GOTREF(__pyx_t_11);
14798  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14799  if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
14800  PyObject* sequence = __pyx_t_11;
14801  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
14802  if (unlikely(size != 3)) {
14803  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
14804  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
14805  __PYX_ERR(1, 753, __pyx_L1_error)
14806  }
14807  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14808  if (likely(PyTuple_CheckExact(sequence))) {
14809  __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
14810  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
14811  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2);
14812  } else {
14813  __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
14814  __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
14815  __pyx_t_2 = PyList_GET_ITEM(sequence, 2);
14816  }
14817  __Pyx_INCREF(__pyx_t_7);
14818  __Pyx_INCREF(__pyx_t_6);
14819  __Pyx_INCREF(__pyx_t_2);
14820  #else
14821  __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 753, __pyx_L1_error)
14822  __Pyx_GOTREF(__pyx_t_7);
14823  __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 753, __pyx_L1_error)
14824  __Pyx_GOTREF(__pyx_t_6);
14825  __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 753, __pyx_L1_error)
14826  __Pyx_GOTREF(__pyx_t_2);
14827  #endif
14828  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14829  } else {
14830  Py_ssize_t index = -1;
14831  __pyx_t_15 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 753, __pyx_L1_error)
14832  __Pyx_GOTREF(__pyx_t_15);
14833  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14834  __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext;
14835  index = 0; __pyx_t_7 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_7)) goto __pyx_L86_unpacking_failed;
14836  __Pyx_GOTREF(__pyx_t_7);
14837  index = 1; __pyx_t_6 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L86_unpacking_failed;
14838  __Pyx_GOTREF(__pyx_t_6);
14839  index = 2; __pyx_t_2 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_2)) goto __pyx_L86_unpacking_failed;
14840  __Pyx_GOTREF(__pyx_t_2);
14841  if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 3) < 0) __PYX_ERR(1, 753, __pyx_L1_error)
14842  __pyx_t_16 = NULL;
14843  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14844  goto __pyx_L87_unpacking_done;
14845  __pyx_L86_unpacking_failed:;
14846  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
14847  __pyx_t_16 = NULL;
14848  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
14849  __PYX_ERR(1, 753, __pyx_L1_error)
14850  __pyx_L87_unpacking_done:;
14851  }
14852 
14853  /* "ADR.pyx":753
14854  * #Repeat the same thing for the element boundary quadrature
14855  * #
14856  * (self.elementBoundaryQuadraturePoints, # <<<<<<<<<<<<<<
14857  * self.elementBoundaryQuadratureWeights,
14858  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
14859  */
14860  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints, __pyx_t_7) < 0) __PYX_ERR(1, 753, __pyx_L1_error)
14861  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14862 
14863  /* "ADR.pyx":754
14864  * #
14865  * (self.elementBoundaryQuadraturePoints,
14866  * self.elementBoundaryQuadratureWeights, # <<<<<<<<<<<<<<
14867  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
14868  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14869  */
14870  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights, __pyx_t_6) < 0) __PYX_ERR(1, 754, __pyx_L1_error)
14871  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14872 
14873  /* "ADR.pyx":755
14874  * (self.elementBoundaryQuadraturePoints,
14875  * self.elementBoundaryQuadratureWeights,
14876  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict) # <<<<<<<<<<<<<<
14877  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14878  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
14879  */
14880  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureRuleInd, __pyx_t_2) < 0) __PYX_ERR(1, 755, __pyx_L1_error)
14881  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14882 
14883  /* "ADR.pyx":756
14884  * self.elementBoundaryQuadratureWeights,
14885  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
14886  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0] # <<<<<<<<<<<<<<
14887  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
14888  * self.mesh.nElementBoundaries_element*
14889  */
14890  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 756, __pyx_L1_error)
14891  __Pyx_GOTREF(__pyx_t_11);
14892  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 756, __pyx_L1_error)
14893  __Pyx_GOTREF(__pyx_t_2);
14894  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14895  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 756, __pyx_L1_error)
14896  __Pyx_GOTREF(__pyx_t_11);
14897  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14898  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_t_11) < 0) __PYX_ERR(1, 756, __pyx_L1_error)
14899  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14900 
14901  /* "ADR.pyx":757
14902  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
14903  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14904  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
14905  * self.mesh.nElementBoundaries_element*
14906  * self.nElementBoundaryQuadraturePoints_elementBoundary)
14907  */
14908  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 757, __pyx_L1_error)
14909  __Pyx_GOTREF(__pyx_t_11);
14910  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 757, __pyx_L1_error)
14911  __Pyx_GOTREF(__pyx_t_2);
14912  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14913 
14914  /* "ADR.pyx":758
14915  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14916  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
14917  * self.mesh.nElementBoundaries_element* # <<<<<<<<<<<<<<
14918  * self.nElementBoundaryQuadraturePoints_elementBoundary)
14919  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
14920  */
14921  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 758, __pyx_L1_error)
14922  __Pyx_GOTREF(__pyx_t_11);
14923  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 758, __pyx_L1_error)
14924  __Pyx_GOTREF(__pyx_t_6);
14925  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14926 
14927  /* "ADR.pyx":757
14928  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
14929  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14930  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
14931  * self.mesh.nElementBoundaries_element*
14932  * self.nElementBoundaryQuadraturePoints_elementBoundary)
14933  */
14934  __pyx_t_11 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 757, __pyx_L1_error)
14935  __Pyx_GOTREF(__pyx_t_11);
14936  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14937  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14938 
14939  /* "ADR.pyx":759
14940  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
14941  * self.mesh.nElementBoundaries_element*
14942  * self.nElementBoundaryQuadraturePoints_elementBoundary) # <<<<<<<<<<<<<<
14943  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
14944  * if self.nSpace_global == 3:
14945  */
14946  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 759, __pyx_L1_error)
14947  __Pyx_GOTREF(__pyx_t_6);
14948 
14949  /* "ADR.pyx":758
14950  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14951  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global*
14952  * self.mesh.nElementBoundaries_element* # <<<<<<<<<<<<<<
14953  * self.nElementBoundaryQuadraturePoints_elementBoundary)
14954  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
14955  */
14956  __pyx_t_2 = PyNumber_Multiply(__pyx_t_11, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 758, __pyx_L1_error)
14957  __Pyx_GOTREF(__pyx_t_2);
14958  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14959  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14960 
14961  /* "ADR.pyx":757
14962  * self.elementBoundaryQuadratureRuleIndeces) = Quadrature.buildUnion(elementBoundaryQuadratureDict)
14963  * self.nElementBoundaryQuadraturePoints_elementBoundary = self.elementBoundaryQuadraturePoints.shape[0]
14964  * self.nElementBoundaryQuadraturePoints_global = (self.mesh.nElements_global* # <<<<<<<<<<<<<<
14965  * self.mesh.nElementBoundaries_element*
14966  * self.nElementBoundaryQuadraturePoints_elementBoundary)
14967  */
14968  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints_2, __pyx_t_2) < 0) __PYX_ERR(1, 757, __pyx_L1_error)
14969  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14970 
14971  /* "ADR.pyx":760
14972  * self.mesh.nElementBoundaries_element*
14973  * self.nElementBoundaryQuadraturePoints_elementBoundary)
14974  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis: # <<<<<<<<<<<<<<
14975  * if self.nSpace_global == 3:
14976  * assert(self.nQuadraturePoints_element == 5)
14977  */
14978  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 760, __pyx_L1_error)
14979  __Pyx_GOTREF(__pyx_t_2);
14980  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 760, __pyx_L1_error)
14981  __Pyx_GOTREF(__pyx_t_6);
14982  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14983  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 760, __pyx_L1_error)
14984  __Pyx_GOTREF(__pyx_t_2);
14985  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14986  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 760, __pyx_L1_error)
14987  __Pyx_GOTREF(__pyx_t_6);
14988  __pyx_t_11 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_2)), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 760, __pyx_L1_error)
14989  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14990  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14991  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 760, __pyx_L1_error)
14992  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
14993  if (__pyx_t_3) {
14994 
14995  /* "ADR.pyx":761
14996  * self.nElementBoundaryQuadraturePoints_elementBoundary)
14997  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
14998  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
14999  * assert(self.nQuadraturePoints_element == 5)
15000  * elif self.nSpace_global == 2:
15001  */
15002  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 761, __pyx_L1_error)
15003  __Pyx_GOTREF(__pyx_t_11);
15004  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 761, __pyx_L1_error)
15005  __Pyx_GOTREF(__pyx_t_6);
15006  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15007  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 761, __pyx_L1_error)
15008  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15009  if (__pyx_t_3) {
15010 
15011  /* "ADR.pyx":762
15012  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15013  * if self.nSpace_global == 3:
15014  * assert(self.nQuadraturePoints_element == 5) # <<<<<<<<<<<<<<
15015  * elif self.nSpace_global == 2:
15016  * assert(self.nQuadraturePoints_element == 6)
15017  */
15018  #ifndef CYTHON_WITHOUT_ASSERTIONS
15019  if (unlikely(!Py_OptimizeFlag)) {
15020  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 762, __pyx_L1_error)
15021  __Pyx_GOTREF(__pyx_t_6);
15022  __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 762, __pyx_L1_error)
15023  __Pyx_GOTREF(__pyx_t_11);
15024  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15025  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 762, __pyx_L1_error)
15026  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15027  if (unlikely(!__pyx_t_3)) {
15028  PyErr_SetNone(PyExc_AssertionError);
15029  __PYX_ERR(1, 762, __pyx_L1_error)
15030  }
15031  }
15032  #endif
15033 
15034  /* "ADR.pyx":761
15035  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15036  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis:
15037  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15038  * assert(self.nQuadraturePoints_element == 5)
15039  * elif self.nSpace_global == 2:
15040  */
15041  goto __pyx_L89;
15042  }
15043 
15044  /* "ADR.pyx":763
15045  * if self.nSpace_global == 3:
15046  * assert(self.nQuadraturePoints_element == 5)
15047  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15048  * assert(self.nQuadraturePoints_element == 6)
15049  * elif self.nSpace_global == 1:
15050  */
15051  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 763, __pyx_L1_error)
15052  __Pyx_GOTREF(__pyx_t_11);
15053  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 763, __pyx_L1_error)
15054  __Pyx_GOTREF(__pyx_t_6);
15055  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15056  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 763, __pyx_L1_error)
15057  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15058  if (__pyx_t_3) {
15059 
15060  /* "ADR.pyx":764
15061  * assert(self.nQuadraturePoints_element == 5)
15062  * elif self.nSpace_global == 2:
15063  * assert(self.nQuadraturePoints_element == 6) # <<<<<<<<<<<<<<
15064  * elif self.nSpace_global == 1:
15065  * assert(self.nQuadraturePoints_element == 3)
15066  */
15067  #ifndef CYTHON_WITHOUT_ASSERTIONS
15068  if (unlikely(!Py_OptimizeFlag)) {
15069  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 764, __pyx_L1_error)
15070  __Pyx_GOTREF(__pyx_t_6);
15071  __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_6, 6, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 764, __pyx_L1_error)
15072  __Pyx_GOTREF(__pyx_t_11);
15073  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15074  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 764, __pyx_L1_error)
15075  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15076  if (unlikely(!__pyx_t_3)) {
15077  PyErr_SetNone(PyExc_AssertionError);
15078  __PYX_ERR(1, 764, __pyx_L1_error)
15079  }
15080  }
15081  #endif
15082 
15083  /* "ADR.pyx":763
15084  * if self.nSpace_global == 3:
15085  * assert(self.nQuadraturePoints_element == 5)
15086  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15087  * assert(self.nQuadraturePoints_element == 6)
15088  * elif self.nSpace_global == 1:
15089  */
15090  goto __pyx_L89;
15091  }
15092 
15093  /* "ADR.pyx":765
15094  * elif self.nSpace_global == 2:
15095  * assert(self.nQuadraturePoints_element == 6)
15096  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15097  * assert(self.nQuadraturePoints_element == 3)
15098  *
15099  */
15100  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 765, __pyx_L1_error)
15101  __Pyx_GOTREF(__pyx_t_11);
15102  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 765, __pyx_L1_error)
15103  __Pyx_GOTREF(__pyx_t_6);
15104  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15105  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 765, __pyx_L1_error)
15106  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15107  if (__pyx_t_3) {
15108 
15109  /* "ADR.pyx":766
15110  * assert(self.nQuadraturePoints_element == 6)
15111  * elif self.nSpace_global == 1:
15112  * assert(self.nQuadraturePoints_element == 3) # <<<<<<<<<<<<<<
15113  *
15114  * if self.nSpace_global == 3:
15115  */
15116  #ifndef CYTHON_WITHOUT_ASSERTIONS
15117  if (unlikely(!Py_OptimizeFlag)) {
15118  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 766, __pyx_L1_error)
15119  __Pyx_GOTREF(__pyx_t_6);
15120  __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 766, __pyx_L1_error)
15121  __Pyx_GOTREF(__pyx_t_11);
15122  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15123  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 766, __pyx_L1_error)
15124  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15125  if (unlikely(!__pyx_t_3)) {
15126  PyErr_SetNone(PyExc_AssertionError);
15127  __PYX_ERR(1, 766, __pyx_L1_error)
15128  }
15129  }
15130  #endif
15131 
15132  /* "ADR.pyx":765
15133  * elif self.nSpace_global == 2:
15134  * assert(self.nQuadraturePoints_element == 6)
15135  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15136  * assert(self.nQuadraturePoints_element == 3)
15137  *
15138  */
15139  }
15140  __pyx_L89:;
15141 
15142  /* "ADR.pyx":768
15143  * assert(self.nQuadraturePoints_element == 3)
15144  *
15145  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15146  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15147  * elif self.nSpace_global == 2:
15148  */
15149  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 768, __pyx_L1_error)
15150  __Pyx_GOTREF(__pyx_t_11);
15151  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 768, __pyx_L1_error)
15152  __Pyx_GOTREF(__pyx_t_6);
15153  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15154  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 768, __pyx_L1_error)
15155  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15156  if (__pyx_t_3) {
15157 
15158  /* "ADR.pyx":769
15159  *
15160  * if self.nSpace_global == 3:
15161  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4) # <<<<<<<<<<<<<<
15162  * elif self.nSpace_global == 2:
15163  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15164  */
15165  #ifndef CYTHON_WITHOUT_ASSERTIONS
15166  if (unlikely(!Py_OptimizeFlag)) {
15167  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 769, __pyx_L1_error)
15168  __Pyx_GOTREF(__pyx_t_6);
15169  __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 769, __pyx_L1_error)
15170  __Pyx_GOTREF(__pyx_t_11);
15171  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15172  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 769, __pyx_L1_error)
15173  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15174  if (unlikely(!__pyx_t_3)) {
15175  PyErr_SetNone(PyExc_AssertionError);
15176  __PYX_ERR(1, 769, __pyx_L1_error)
15177  }
15178  }
15179  #endif
15180 
15181  /* "ADR.pyx":768
15182  * assert(self.nQuadraturePoints_element == 3)
15183  *
15184  * if self.nSpace_global == 3: # <<<<<<<<<<<<<<
15185  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15186  * elif self.nSpace_global == 2:
15187  */
15188  goto __pyx_L90;
15189  }
15190 
15191  /* "ADR.pyx":770
15192  * if self.nSpace_global == 3:
15193  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15194  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15195  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15196  * elif self.nSpace_global == 1:
15197  */
15198  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 770, __pyx_L1_error)
15199  __Pyx_GOTREF(__pyx_t_11);
15200  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 770, __pyx_L1_error)
15201  __Pyx_GOTREF(__pyx_t_6);
15202  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15203  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 770, __pyx_L1_error)
15204  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15205  if (__pyx_t_3) {
15206 
15207  /* "ADR.pyx":771
15208  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15209  * elif self.nSpace_global == 2:
15210  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4) # <<<<<<<<<<<<<<
15211  * elif self.nSpace_global == 1:
15212  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15213  */
15214  #ifndef CYTHON_WITHOUT_ASSERTIONS
15215  if (unlikely(!Py_OptimizeFlag)) {
15216  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 771, __pyx_L1_error)
15217  __Pyx_GOTREF(__pyx_t_6);
15218  __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 771, __pyx_L1_error)
15219  __Pyx_GOTREF(__pyx_t_11);
15220  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15221  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 771, __pyx_L1_error)
15222  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15223  if (unlikely(!__pyx_t_3)) {
15224  PyErr_SetNone(PyExc_AssertionError);
15225  __PYX_ERR(1, 771, __pyx_L1_error)
15226  }
15227  }
15228  #endif
15229 
15230  /* "ADR.pyx":770
15231  * if self.nSpace_global == 3:
15232  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15233  * elif self.nSpace_global == 2: # <<<<<<<<<<<<<<
15234  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15235  * elif self.nSpace_global == 1:
15236  */
15237  goto __pyx_L90;
15238  }
15239 
15240  /* "ADR.pyx":772
15241  * elif self.nSpace_global == 2:
15242  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15243  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15244  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15245  *
15246  */
15247  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 772, __pyx_L1_error)
15248  __Pyx_GOTREF(__pyx_t_11);
15249  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 772, __pyx_L1_error)
15250  __Pyx_GOTREF(__pyx_t_6);
15251  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15252  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 772, __pyx_L1_error)
15253  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15254  if (__pyx_t_3) {
15255 
15256  /* "ADR.pyx":773
15257  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15258  * elif self.nSpace_global == 1:
15259  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1) # <<<<<<<<<<<<<<
15260  *
15261  * #pdb.set_trace()
15262  */
15263  #ifndef CYTHON_WITHOUT_ASSERTIONS
15264  if (unlikely(!Py_OptimizeFlag)) {
15265  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 773, __pyx_L1_error)
15266  __Pyx_GOTREF(__pyx_t_6);
15267  __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 773, __pyx_L1_error)
15268  __Pyx_GOTREF(__pyx_t_11);
15269  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15270  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 773, __pyx_L1_error)
15271  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15272  if (unlikely(!__pyx_t_3)) {
15273  PyErr_SetNone(PyExc_AssertionError);
15274  __PYX_ERR(1, 773, __pyx_L1_error)
15275  }
15276  }
15277  #endif
15278 
15279  /* "ADR.pyx":772
15280  * elif self.nSpace_global == 2:
15281  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 4)
15282  * elif self.nSpace_global == 1: # <<<<<<<<<<<<<<
15283  * assert(self.nElementBoundaryQuadraturePoints_elementBoundary == 1)
15284  *
15285  */
15286  }
15287  __pyx_L90:;
15288 
15289  /* "ADR.pyx":760
15290  * self.mesh.nElementBoundaries_element*
15291  * self.nElementBoundaryQuadraturePoints_elementBoundary)
15292  * if type(self.u[0].femSpace) == C0_AffineLinearOnSimplexWithNodalBasis: # <<<<<<<<<<<<<<
15293  * if self.nSpace_global == 3:
15294  * assert(self.nQuadraturePoints_element == 5)
15295  */
15296  }
15297 
15298  /* "ADR.pyx":779
15299  * #simplified allocations for test==trial and also check if space is mixed or not
15300  * #
15301  * self.q={} # <<<<<<<<<<<<<<
15302  * self.ebq={}
15303  * self.ebq_global={}
15304  */
15305  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 779, __pyx_L1_error)
15306  __Pyx_GOTREF(__pyx_t_11);
15307  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_q, __pyx_t_11) < 0) __PYX_ERR(1, 779, __pyx_L1_error)
15308  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15309 
15310  /* "ADR.pyx":780
15311  * #
15312  * self.q={}
15313  * self.ebq={} # <<<<<<<<<<<<<<
15314  * self.ebq_global={}
15315  * self.ebqe={}
15316  */
15317  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 780, __pyx_L1_error)
15318  __Pyx_GOTREF(__pyx_t_11);
15319  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebq, __pyx_t_11) < 0) __PYX_ERR(1, 780, __pyx_L1_error)
15320  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15321 
15322  /* "ADR.pyx":781
15323  * self.q={}
15324  * self.ebq={}
15325  * self.ebq_global={} # <<<<<<<<<<<<<<
15326  * self.ebqe={}
15327  * self.phi_ip={}
15328  */
15329  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 781, __pyx_L1_error)
15330  __Pyx_GOTREF(__pyx_t_11);
15331  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global, __pyx_t_11) < 0) __PYX_ERR(1, 781, __pyx_L1_error)
15332  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15333 
15334  /* "ADR.pyx":782
15335  * self.ebq={}
15336  * self.ebq_global={}
15337  * self.ebqe={} # <<<<<<<<<<<<<<
15338  * self.phi_ip={}
15339  * #mesh
15340  */
15341  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 782, __pyx_L1_error)
15342  __Pyx_GOTREF(__pyx_t_11);
15343  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ebqe, __pyx_t_11) < 0) __PYX_ERR(1, 782, __pyx_L1_error)
15344  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15345 
15346  /* "ADR.pyx":783
15347  * self.ebq_global={}
15348  * self.ebqe={}
15349  * self.phi_ip={} # <<<<<<<<<<<<<<
15350  * #mesh
15351  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15352  */
15353  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 783, __pyx_L1_error)
15354  __Pyx_GOTREF(__pyx_t_11);
15355  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_phi_ip, __pyx_t_11) < 0) __PYX_ERR(1, 783, __pyx_L1_error)
15356  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15357 
15358  /* "ADR.pyx":785
15359  * self.phi_ip={}
15360  * #mesh
15361  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d') # <<<<<<<<<<<<<<
15362  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15363  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15364  */
15365  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 785, __pyx_L1_error)
15366  __Pyx_GOTREF(__pyx_t_6);
15367  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 785, __pyx_L1_error)
15368  __Pyx_GOTREF(__pyx_t_2);
15369  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15370  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 785, __pyx_L1_error)
15371  __Pyx_GOTREF(__pyx_t_6);
15372  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 785, __pyx_L1_error)
15373  __Pyx_GOTREF(__pyx_t_7);
15374  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15375  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 785, __pyx_L1_error)
15376  __Pyx_GOTREF(__pyx_t_6);
15377  __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 785, __pyx_L1_error)
15378  __Pyx_GOTREF(__pyx_t_15);
15379  __Pyx_GIVEREF(__pyx_t_7);
15380  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
15381  __Pyx_GIVEREF(__pyx_t_6);
15382  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_6);
15383  __Pyx_INCREF(__pyx_int_3);
15384  __Pyx_GIVEREF(__pyx_int_3);
15385  PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_3);
15386  __pyx_t_7 = 0;
15387  __pyx_t_6 = 0;
15388  __pyx_t_6 = NULL;
15389  __pyx_t_14 = 0;
15390  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
15391  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
15392  if (likely(__pyx_t_6)) {
15393  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15394  __Pyx_INCREF(__pyx_t_6);
15395  __Pyx_INCREF(function);
15396  __Pyx_DECREF_SET(__pyx_t_2, function);
15397  __pyx_t_14 = 1;
15398  }
15399  }
15400  #if CYTHON_FAST_PYCALL
15401  if (PyFunction_Check(__pyx_t_2)) {
15402  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_n_s_d};
15403  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 785, __pyx_L1_error)
15404  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15405  __Pyx_GOTREF(__pyx_t_11);
15406  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15407  } else
15408  #endif
15409  #if CYTHON_FAST_PYCCALL
15410  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
15411  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_n_s_d};
15412  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 785, __pyx_L1_error)
15413  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15414  __Pyx_GOTREF(__pyx_t_11);
15415  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15416  } else
15417  #endif
15418  {
15419  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 785, __pyx_L1_error)
15420  __Pyx_GOTREF(__pyx_t_7);
15421  if (__pyx_t_6) {
15422  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
15423  }
15424  __Pyx_GIVEREF(__pyx_t_15);
15425  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_15);
15426  __Pyx_INCREF(__pyx_n_s_d);
15427  __Pyx_GIVEREF(__pyx_n_s_d);
15428  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_d);
15429  __pyx_t_15 = 0;
15430  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 785, __pyx_L1_error)
15431  __Pyx_GOTREF(__pyx_t_11);
15432  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15433  }
15434  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15435  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 785, __pyx_L1_error)
15436  __Pyx_GOTREF(__pyx_t_2);
15437  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_s_x, __pyx_t_11) < 0)) __PYX_ERR(1, 785, __pyx_L1_error)
15438  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15439  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15440 
15441  /* "ADR.pyx":786
15442  * #mesh
15443  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15444  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d') # <<<<<<<<<<<<<<
15445  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15446  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15447  */
15448  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 786, __pyx_L1_error)
15449  __Pyx_GOTREF(__pyx_t_2);
15450  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 786, __pyx_L1_error)
15451  __Pyx_GOTREF(__pyx_t_7);
15452  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15453  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 786, __pyx_L1_error)
15454  __Pyx_GOTREF(__pyx_t_2);
15455  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 786, __pyx_L1_error)
15456  __Pyx_GOTREF(__pyx_t_15);
15457  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15458  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 786, __pyx_L1_error)
15459  __Pyx_GOTREF(__pyx_t_2);
15460  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 786, __pyx_L1_error)
15461  __Pyx_GOTREF(__pyx_t_6);
15462  __Pyx_GIVEREF(__pyx_t_15);
15463  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
15464  __Pyx_GIVEREF(__pyx_t_2);
15465  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
15466  __Pyx_INCREF(__pyx_int_3);
15467  __Pyx_GIVEREF(__pyx_int_3);
15468  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_3);
15469  __pyx_t_15 = 0;
15470  __pyx_t_2 = 0;
15471  __pyx_t_2 = NULL;
15472  __pyx_t_14 = 0;
15473  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
15474  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
15475  if (likely(__pyx_t_2)) {
15476  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
15477  __Pyx_INCREF(__pyx_t_2);
15478  __Pyx_INCREF(function);
15479  __Pyx_DECREF_SET(__pyx_t_7, function);
15480  __pyx_t_14 = 1;
15481  }
15482  }
15483  #if CYTHON_FAST_PYCALL
15484  if (PyFunction_Check(__pyx_t_7)) {
15485  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_n_s_d};
15486  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 786, __pyx_L1_error)
15487  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15488  __Pyx_GOTREF(__pyx_t_11);
15489  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15490  } else
15491  #endif
15492  #if CYTHON_FAST_PYCCALL
15493  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
15494  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_n_s_d};
15495  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 786, __pyx_L1_error)
15496  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15497  __Pyx_GOTREF(__pyx_t_11);
15498  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15499  } else
15500  #endif
15501  {
15502  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 786, __pyx_L1_error)
15503  __Pyx_GOTREF(__pyx_t_15);
15504  if (__pyx_t_2) {
15505  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL;
15506  }
15507  __Pyx_GIVEREF(__pyx_t_6);
15508  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_6);
15509  __Pyx_INCREF(__pyx_n_s_d);
15510  __Pyx_GIVEREF(__pyx_n_s_d);
15511  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
15512  __pyx_t_6 = 0;
15513  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 786, __pyx_L1_error)
15514  __Pyx_GOTREF(__pyx_t_11);
15515  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15516  }
15517  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15518  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 786, __pyx_L1_error)
15519  __Pyx_GOTREF(__pyx_t_7);
15520  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_n_s_x, __pyx_t_11) < 0)) __PYX_ERR(1, 786, __pyx_L1_error)
15521  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15522  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15523 
15524  /* "ADR.pyx":787
15525  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
15526  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15527  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
15528  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15529  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15530  */
15531  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 787, __pyx_L1_error)
15532  __Pyx_GOTREF(__pyx_t_7);
15533  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 787, __pyx_L1_error)
15534  __Pyx_GOTREF(__pyx_t_15);
15535  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15536  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 787, __pyx_L1_error)
15537  __Pyx_GOTREF(__pyx_t_7);
15538  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 787, __pyx_L1_error)
15539  __Pyx_GOTREF(__pyx_t_6);
15540  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15541  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 787, __pyx_L1_error)
15542  __Pyx_GOTREF(__pyx_t_7);
15543  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 787, __pyx_L1_error)
15544  __Pyx_GOTREF(__pyx_t_2);
15545  __Pyx_GIVEREF(__pyx_t_6);
15546  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
15547  __Pyx_GIVEREF(__pyx_t_7);
15548  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
15549  __pyx_t_6 = 0;
15550  __pyx_t_7 = 0;
15551  __pyx_t_7 = NULL;
15552  __pyx_t_14 = 0;
15553  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
15554  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
15555  if (likely(__pyx_t_7)) {
15556  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
15557  __Pyx_INCREF(__pyx_t_7);
15558  __Pyx_INCREF(function);
15559  __Pyx_DECREF_SET(__pyx_t_15, function);
15560  __pyx_t_14 = 1;
15561  }
15562  }
15563  #if CYTHON_FAST_PYCALL
15564  if (PyFunction_Check(__pyx_t_15)) {
15565  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_n_s_d};
15566  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 787, __pyx_L1_error)
15567  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15568  __Pyx_GOTREF(__pyx_t_11);
15569  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15570  } else
15571  #endif
15572  #if CYTHON_FAST_PYCCALL
15573  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
15574  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_n_s_d};
15575  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 787, __pyx_L1_error)
15576  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15577  __Pyx_GOTREF(__pyx_t_11);
15578  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15579  } else
15580  #endif
15581  {
15582  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 787, __pyx_L1_error)
15583  __Pyx_GOTREF(__pyx_t_6);
15584  if (__pyx_t_7) {
15585  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
15586  }
15587  __Pyx_GIVEREF(__pyx_t_2);
15588  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_t_2);
15589  __Pyx_INCREF(__pyx_n_s_d);
15590  __Pyx_GIVEREF(__pyx_n_s_d);
15591  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_n_s_d);
15592  __pyx_t_2 = 0;
15593  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 787, __pyx_L1_error)
15594  __Pyx_GOTREF(__pyx_t_11);
15595  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15596  }
15597  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15598  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 787, __pyx_L1_error)
15599  __Pyx_GOTREF(__pyx_t_15);
15600  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__8, __pyx_t_11) < 0)) __PYX_ERR(1, 787, __pyx_L1_error)
15601  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15602  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15603 
15604  /* "ADR.pyx":788
15605  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
15606  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15607  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
15608  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15609  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15610  */
15611  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 788, __pyx_L1_error)
15612  __Pyx_GOTREF(__pyx_t_15);
15613  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 788, __pyx_L1_error)
15614  __Pyx_GOTREF(__pyx_t_6);
15615  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15616  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 788, __pyx_L1_error)
15617  __Pyx_GOTREF(__pyx_t_15);
15618  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 788, __pyx_L1_error)
15619  __Pyx_GOTREF(__pyx_t_2);
15620  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15621  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 788, __pyx_L1_error)
15622  __Pyx_GOTREF(__pyx_t_15);
15623  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 788, __pyx_L1_error)
15624  __Pyx_GOTREF(__pyx_t_7);
15625  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 788, __pyx_L1_error)
15626  __Pyx_GOTREF(__pyx_t_1);
15627  __Pyx_GIVEREF(__pyx_t_2);
15628  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
15629  __Pyx_GIVEREF(__pyx_t_15);
15630  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_15);
15631  __Pyx_GIVEREF(__pyx_t_7);
15632  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
15633  __pyx_t_2 = 0;
15634  __pyx_t_15 = 0;
15635  __pyx_t_7 = 0;
15636  __pyx_t_7 = NULL;
15637  __pyx_t_14 = 0;
15638  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15639  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
15640  if (likely(__pyx_t_7)) {
15641  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15642  __Pyx_INCREF(__pyx_t_7);
15643  __Pyx_INCREF(function);
15644  __Pyx_DECREF_SET(__pyx_t_6, function);
15645  __pyx_t_14 = 1;
15646  }
15647  }
15648  #if CYTHON_FAST_PYCALL
15649  if (PyFunction_Check(__pyx_t_6)) {
15650  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
15651  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 788, __pyx_L1_error)
15652  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15653  __Pyx_GOTREF(__pyx_t_11);
15654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15655  } else
15656  #endif
15657  #if CYTHON_FAST_PYCCALL
15658  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
15659  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
15660  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 788, __pyx_L1_error)
15661  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15662  __Pyx_GOTREF(__pyx_t_11);
15663  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15664  } else
15665  #endif
15666  {
15667  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 788, __pyx_L1_error)
15668  __Pyx_GOTREF(__pyx_t_15);
15669  if (__pyx_t_7) {
15670  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
15671  }
15672  __Pyx_GIVEREF(__pyx_t_1);
15673  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_1);
15674  __Pyx_INCREF(__pyx_n_s_d);
15675  __Pyx_GIVEREF(__pyx_n_s_d);
15676  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
15677  __pyx_t_1 = 0;
15678  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 788, __pyx_L1_error)
15679  __Pyx_GOTREF(__pyx_t_11);
15680  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15681  }
15682  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15683  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 788, __pyx_L1_error)
15684  __Pyx_GOTREF(__pyx_t_6);
15685  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_tuple__9, __pyx_t_11) < 0)) __PYX_ERR(1, 788, __pyx_L1_error)
15686  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15687  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15688 
15689  /* "ADR.pyx":789
15690  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15691  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15692  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
15693  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15694  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15695  */
15696  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 789, __pyx_L1_error)
15697  __Pyx_GOTREF(__pyx_t_6);
15698  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 789, __pyx_L1_error)
15699  __Pyx_GOTREF(__pyx_t_15);
15700  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15701  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 789, __pyx_L1_error)
15702  __Pyx_GOTREF(__pyx_t_6);
15703  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 789, __pyx_L1_error)
15704  __Pyx_GOTREF(__pyx_t_1);
15705  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15706  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 789, __pyx_L1_error)
15707  __Pyx_GOTREF(__pyx_t_6);
15708  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 789, __pyx_L1_error)
15709  __Pyx_GOTREF(__pyx_t_7);
15710  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 789, __pyx_L1_error)
15711  __Pyx_GOTREF(__pyx_t_2);
15712  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15713  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_tuple__4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 789, __pyx_L1_error)
15714  __Pyx_GOTREF(__pyx_t_7);
15715  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15716  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 789, __pyx_L1_error)
15717  __Pyx_GOTREF(__pyx_t_2);
15718  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15719  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 789, __pyx_L1_error)
15720  __Pyx_GOTREF(__pyx_t_7);
15721  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15722  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 789, __pyx_L1_error)
15723  __Pyx_GOTREF(__pyx_t_2);
15724  __Pyx_GIVEREF(__pyx_t_1);
15725  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
15726  __Pyx_GIVEREF(__pyx_t_6);
15727  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
15728  __Pyx_GIVEREF(__pyx_t_7);
15729  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7);
15730  __pyx_t_1 = 0;
15731  __pyx_t_6 = 0;
15732  __pyx_t_7 = 0;
15733  __pyx_t_7 = NULL;
15734  __pyx_t_14 = 0;
15735  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
15736  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_15);
15737  if (likely(__pyx_t_7)) {
15738  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
15739  __Pyx_INCREF(__pyx_t_7);
15740  __Pyx_INCREF(function);
15741  __Pyx_DECREF_SET(__pyx_t_15, function);
15742  __pyx_t_14 = 1;
15743  }
15744  }
15745  #if CYTHON_FAST_PYCALL
15746  if (PyFunction_Check(__pyx_t_15)) {
15747  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_n_s_d};
15748  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 789, __pyx_L1_error)
15749  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15750  __Pyx_GOTREF(__pyx_t_11);
15751  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15752  } else
15753  #endif
15754  #if CYTHON_FAST_PYCCALL
15755  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
15756  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_n_s_d};
15757  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 789, __pyx_L1_error)
15758  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15759  __Pyx_GOTREF(__pyx_t_11);
15760  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15761  } else
15762  #endif
15763  {
15764  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 789, __pyx_L1_error)
15765  __Pyx_GOTREF(__pyx_t_6);
15766  if (__pyx_t_7) {
15767  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
15768  }
15769  __Pyx_GIVEREF(__pyx_t_2);
15770  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_t_2);
15771  __Pyx_INCREF(__pyx_n_s_d);
15772  __Pyx_GIVEREF(__pyx_n_s_d);
15773  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_n_s_d);
15774  __pyx_t_2 = 0;
15775  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 789, __pyx_L1_error)
15776  __Pyx_GOTREF(__pyx_t_11);
15777  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15778  }
15779  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15780  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 789, __pyx_L1_error)
15781  __Pyx_GOTREF(__pyx_t_15);
15782  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__10, __pyx_t_11) < 0)) __PYX_ERR(1, 789, __pyx_L1_error)
15783  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15784  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15785 
15786  /* "ADR.pyx":790
15787  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15788  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15789  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
15790  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15791  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15792  */
15793  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 790, __pyx_L1_error)
15794  __Pyx_GOTREF(__pyx_t_15);
15795  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 790, __pyx_L1_error)
15796  __Pyx_GOTREF(__pyx_t_6);
15797  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15798  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 790, __pyx_L1_error)
15799  __Pyx_GOTREF(__pyx_t_15);
15800  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 790, __pyx_L1_error)
15801  __Pyx_GOTREF(__pyx_t_2);
15802  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15803  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 790, __pyx_L1_error)
15804  __Pyx_GOTREF(__pyx_t_15);
15805  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 790, __pyx_L1_error)
15806  __Pyx_GOTREF(__pyx_t_7);
15807  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 790, __pyx_L1_error)
15808  __Pyx_GOTREF(__pyx_t_1);
15809  __Pyx_GIVEREF(__pyx_t_2);
15810  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
15811  __Pyx_GIVEREF(__pyx_t_15);
15812  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_15);
15813  __Pyx_GIVEREF(__pyx_t_7);
15814  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
15815  __pyx_t_2 = 0;
15816  __pyx_t_15 = 0;
15817  __pyx_t_7 = 0;
15818  __pyx_t_7 = NULL;
15819  __pyx_t_14 = 0;
15820  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15821  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
15822  if (likely(__pyx_t_7)) {
15823  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15824  __Pyx_INCREF(__pyx_t_7);
15825  __Pyx_INCREF(function);
15826  __Pyx_DECREF_SET(__pyx_t_6, function);
15827  __pyx_t_14 = 1;
15828  }
15829  }
15830  #if CYTHON_FAST_PYCALL
15831  if (PyFunction_Check(__pyx_t_6)) {
15832  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
15833  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 790, __pyx_L1_error)
15834  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15835  __Pyx_GOTREF(__pyx_t_11);
15836  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15837  } else
15838  #endif
15839  #if CYTHON_FAST_PYCCALL
15840  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
15841  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
15842  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 790, __pyx_L1_error)
15843  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15844  __Pyx_GOTREF(__pyx_t_11);
15845  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15846  } else
15847  #endif
15848  {
15849  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 790, __pyx_L1_error)
15850  __Pyx_GOTREF(__pyx_t_15);
15851  if (__pyx_t_7) {
15852  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
15853  }
15854  __Pyx_GIVEREF(__pyx_t_1);
15855  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_1);
15856  __Pyx_INCREF(__pyx_n_s_d);
15857  __Pyx_GIVEREF(__pyx_n_s_d);
15858  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
15859  __pyx_t_1 = 0;
15860  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 790, __pyx_L1_error)
15861  __Pyx_GOTREF(__pyx_t_11);
15862  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15863  }
15864  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15865  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 790, __pyx_L1_error)
15866  __Pyx_GOTREF(__pyx_t_6);
15867  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_tuple__11, __pyx_t_11) < 0)) __PYX_ERR(1, 790, __pyx_L1_error)
15868  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15869  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15870 
15871  /* "ADR.pyx":791
15872  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
15873  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15874  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
15875  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15876  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15877  */
15878  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 791, __pyx_L1_error)
15879  __Pyx_GOTREF(__pyx_t_6);
15880  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 791, __pyx_L1_error)
15881  __Pyx_GOTREF(__pyx_t_15);
15882  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15883  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 791, __pyx_L1_error)
15884  __Pyx_GOTREF(__pyx_t_6);
15885  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 791, __pyx_L1_error)
15886  __Pyx_GOTREF(__pyx_t_1);
15887  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15888  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 791, __pyx_L1_error)
15889  __Pyx_GOTREF(__pyx_t_6);
15890  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 791, __pyx_L1_error)
15891  __Pyx_GOTREF(__pyx_t_7);
15892  __Pyx_GIVEREF(__pyx_t_1);
15893  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
15894  __Pyx_GIVEREF(__pyx_t_6);
15895  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
15896  __pyx_t_1 = 0;
15897  __pyx_t_6 = 0;
15898  __pyx_t_6 = NULL;
15899  __pyx_t_14 = 0;
15900  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
15901  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
15902  if (likely(__pyx_t_6)) {
15903  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
15904  __Pyx_INCREF(__pyx_t_6);
15905  __Pyx_INCREF(function);
15906  __Pyx_DECREF_SET(__pyx_t_15, function);
15907  __pyx_t_14 = 1;
15908  }
15909  }
15910  #if CYTHON_FAST_PYCALL
15911  if (PyFunction_Check(__pyx_t_15)) {
15912  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
15913  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 791, __pyx_L1_error)
15914  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15915  __Pyx_GOTREF(__pyx_t_11);
15916  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15917  } else
15918  #endif
15919  #if CYTHON_FAST_PYCCALL
15920  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
15921  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
15922  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 791, __pyx_L1_error)
15923  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15924  __Pyx_GOTREF(__pyx_t_11);
15925  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15926  } else
15927  #endif
15928  {
15929  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 791, __pyx_L1_error)
15930  __Pyx_GOTREF(__pyx_t_1);
15931  if (__pyx_t_6) {
15932  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
15933  }
15934  __Pyx_GIVEREF(__pyx_t_7);
15935  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
15936  __Pyx_INCREF(__pyx_n_s_d);
15937  __Pyx_GIVEREF(__pyx_n_s_d);
15938  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
15939  __pyx_t_7 = 0;
15940  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 791, __pyx_L1_error)
15941  __Pyx_GOTREF(__pyx_t_11);
15942  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15943  }
15944  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15945  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 791, __pyx_L1_error)
15946  __Pyx_GOTREF(__pyx_t_15);
15947  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__12, __pyx_t_11) < 0)) __PYX_ERR(1, 791, __pyx_L1_error)
15948  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15949  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
15950 
15951  /* "ADR.pyx":792
15952  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
15953  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15954  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
15955  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
15956  *
15957  */
15958  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 792, __pyx_L1_error)
15959  __Pyx_GOTREF(__pyx_t_15);
15960  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 792, __pyx_L1_error)
15961  __Pyx_GOTREF(__pyx_t_1);
15962  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15963  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 792, __pyx_L1_error)
15964  __Pyx_GOTREF(__pyx_t_15);
15965  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 792, __pyx_L1_error)
15966  __Pyx_GOTREF(__pyx_t_7);
15967  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
15968  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 792, __pyx_L1_error)
15969  __Pyx_GOTREF(__pyx_t_15);
15970  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 792, __pyx_L1_error)
15971  __Pyx_GOTREF(__pyx_t_6);
15972  __Pyx_GIVEREF(__pyx_t_7);
15973  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
15974  __Pyx_GIVEREF(__pyx_t_15);
15975  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_15);
15976  __pyx_t_7 = 0;
15977  __pyx_t_15 = 0;
15978  __pyx_t_15 = NULL;
15979  __pyx_t_14 = 0;
15980  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
15981  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
15982  if (likely(__pyx_t_15)) {
15983  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
15984  __Pyx_INCREF(__pyx_t_15);
15985  __Pyx_INCREF(function);
15986  __Pyx_DECREF_SET(__pyx_t_1, function);
15987  __pyx_t_14 = 1;
15988  }
15989  }
15990  #if CYTHON_FAST_PYCALL
15991  if (PyFunction_Check(__pyx_t_1)) {
15992  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_6, __pyx_n_s_d};
15993  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 792, __pyx_L1_error)
15994  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
15995  __Pyx_GOTREF(__pyx_t_11);
15996  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15997  } else
15998  #endif
15999  #if CYTHON_FAST_PYCCALL
16000  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
16001  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_6, __pyx_n_s_d};
16002  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 792, __pyx_L1_error)
16003  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16004  __Pyx_GOTREF(__pyx_t_11);
16005  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16006  } else
16007  #endif
16008  {
16009  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 792, __pyx_L1_error)
16010  __Pyx_GOTREF(__pyx_t_7);
16011  if (__pyx_t_15) {
16012  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_15); __pyx_t_15 = NULL;
16013  }
16014  __Pyx_GIVEREF(__pyx_t_6);
16015  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_6);
16016  __Pyx_INCREF(__pyx_n_s_d);
16017  __Pyx_GIVEREF(__pyx_n_s_d);
16018  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_d);
16019  __pyx_t_6 = 0;
16020  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 792, __pyx_L1_error)
16021  __Pyx_GOTREF(__pyx_t_11);
16022  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16023  }
16024  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16025  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 792, __pyx_L1_error)
16026  __Pyx_GOTREF(__pyx_t_1);
16027  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__13, __pyx_t_11) < 0)) __PYX_ERR(1, 792, __pyx_L1_error)
16028  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16029  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16030 
16031  /* "ADR.pyx":793
16032  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16033  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16034  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
16035  *
16036  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16037  */
16038  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 793, __pyx_L1_error)
16039  __Pyx_GOTREF(__pyx_t_1);
16040  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 793, __pyx_L1_error)
16041  __Pyx_GOTREF(__pyx_t_7);
16042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16043  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 793, __pyx_L1_error)
16044  __Pyx_GOTREF(__pyx_t_1);
16045  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 793, __pyx_L1_error)
16046  __Pyx_GOTREF(__pyx_t_6);
16047  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16048  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 793, __pyx_L1_error)
16049  __Pyx_GOTREF(__pyx_t_1);
16050  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 793, __pyx_L1_error)
16051  __Pyx_GOTREF(__pyx_t_15);
16052  __Pyx_GIVEREF(__pyx_t_6);
16053  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
16054  __Pyx_GIVEREF(__pyx_t_1);
16055  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_1);
16056  __pyx_t_6 = 0;
16057  __pyx_t_1 = 0;
16058  __pyx_t_1 = NULL;
16059  __pyx_t_14 = 0;
16060  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16061  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
16062  if (likely(__pyx_t_1)) {
16063  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16064  __Pyx_INCREF(__pyx_t_1);
16065  __Pyx_INCREF(function);
16066  __Pyx_DECREF_SET(__pyx_t_7, function);
16067  __pyx_t_14 = 1;
16068  }
16069  }
16070  #if CYTHON_FAST_PYCALL
16071  if (PyFunction_Check(__pyx_t_7)) {
16072  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
16073  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 793, __pyx_L1_error)
16074  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16075  __Pyx_GOTREF(__pyx_t_11);
16076  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16077  } else
16078  #endif
16079  #if CYTHON_FAST_PYCCALL
16080  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16081  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
16082  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 793, __pyx_L1_error)
16083  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16084  __Pyx_GOTREF(__pyx_t_11);
16085  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16086  } else
16087  #endif
16088  {
16089  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 793, __pyx_L1_error)
16090  __Pyx_GOTREF(__pyx_t_6);
16091  if (__pyx_t_1) {
16092  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
16093  }
16094  __Pyx_GIVEREF(__pyx_t_15);
16095  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_t_15);
16096  __Pyx_INCREF(__pyx_n_s_d);
16097  __Pyx_GIVEREF(__pyx_n_s_d);
16098  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_n_s_d);
16099  __pyx_t_15 = 0;
16100  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 793, __pyx_L1_error)
16101  __Pyx_GOTREF(__pyx_t_11);
16102  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16103  }
16104  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16105  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 793, __pyx_L1_error)
16106  __Pyx_GOTREF(__pyx_t_7);
16107  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__14, __pyx_t_11) < 0)) __PYX_ERR(1, 793, __pyx_L1_error)
16108  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16109  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16110 
16111  /* "ADR.pyx":795
16112  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
16113  *
16114  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16115  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16116  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16117  */
16118  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 795, __pyx_L1_error)
16119  __Pyx_GOTREF(__pyx_t_7);
16120  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 795, __pyx_L1_error)
16121  __Pyx_GOTREF(__pyx_t_6);
16122  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16123  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 795, __pyx_L1_error)
16124  __Pyx_GOTREF(__pyx_t_7);
16125  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 795, __pyx_L1_error)
16126  __Pyx_GOTREF(__pyx_t_15);
16127  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16128  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 795, __pyx_L1_error)
16129  __Pyx_GOTREF(__pyx_t_7);
16130  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 795, __pyx_L1_error)
16131  __Pyx_GOTREF(__pyx_t_1);
16132  __Pyx_GIVEREF(__pyx_t_15);
16133  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15);
16134  __Pyx_GIVEREF(__pyx_t_7);
16135  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
16136  __pyx_t_15 = 0;
16137  __pyx_t_7 = 0;
16138  __pyx_t_7 = NULL;
16139  __pyx_t_14 = 0;
16140  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16141  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
16142  if (likely(__pyx_t_7)) {
16143  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16144  __Pyx_INCREF(__pyx_t_7);
16145  __Pyx_INCREF(function);
16146  __Pyx_DECREF_SET(__pyx_t_6, function);
16147  __pyx_t_14 = 1;
16148  }
16149  }
16150  #if CYTHON_FAST_PYCALL
16151  if (PyFunction_Check(__pyx_t_6)) {
16152  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
16153  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 795, __pyx_L1_error)
16154  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16155  __Pyx_GOTREF(__pyx_t_11);
16156  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16157  } else
16158  #endif
16159  #if CYTHON_FAST_PYCCALL
16160  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
16161  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
16162  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 795, __pyx_L1_error)
16163  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16164  __Pyx_GOTREF(__pyx_t_11);
16165  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16166  } else
16167  #endif
16168  {
16169  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 795, __pyx_L1_error)
16170  __Pyx_GOTREF(__pyx_t_15);
16171  if (__pyx_t_7) {
16172  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
16173  }
16174  __Pyx_GIVEREF(__pyx_t_1);
16175  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_1);
16176  __Pyx_INCREF(__pyx_n_s_d);
16177  __Pyx_GIVEREF(__pyx_n_s_d);
16178  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
16179  __pyx_t_1 = 0;
16180  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 795, __pyx_L1_error)
16181  __Pyx_GOTREF(__pyx_t_11);
16182  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16183  }
16184  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16185  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 795, __pyx_L1_error)
16186  __Pyx_GOTREF(__pyx_t_6);
16187  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_n_s_penalty, __pyx_t_11) < 0)) __PYX_ERR(1, 795, __pyx_L1_error)
16188  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16189  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16190 
16191  /* "ADR.pyx":796
16192  *
16193  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16194  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16195  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16196  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16197  */
16198  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 796, __pyx_L1_error)
16199  __Pyx_GOTREF(__pyx_t_6);
16200  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 796, __pyx_L1_error)
16201  __Pyx_GOTREF(__pyx_t_15);
16202  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16203  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 796, __pyx_L1_error)
16204  __Pyx_GOTREF(__pyx_t_6);
16205  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 796, __pyx_L1_error)
16206  __Pyx_GOTREF(__pyx_t_1);
16207  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16208  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 796, __pyx_L1_error)
16209  __Pyx_GOTREF(__pyx_t_6);
16210  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 796, __pyx_L1_error)
16211  __Pyx_GOTREF(__pyx_t_7);
16212  __Pyx_GIVEREF(__pyx_t_1);
16213  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
16214  __Pyx_GIVEREF(__pyx_t_6);
16215  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
16216  __pyx_t_1 = 0;
16217  __pyx_t_6 = 0;
16218  __pyx_t_6 = NULL;
16219  __pyx_t_14 = 0;
16220  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
16221  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
16222  if (likely(__pyx_t_6)) {
16223  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
16224  __Pyx_INCREF(__pyx_t_6);
16225  __Pyx_INCREF(function);
16226  __Pyx_DECREF_SET(__pyx_t_15, function);
16227  __pyx_t_14 = 1;
16228  }
16229  }
16230  #if CYTHON_FAST_PYCALL
16231  if (PyFunction_Check(__pyx_t_15)) {
16232  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
16233  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 796, __pyx_L1_error)
16234  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16235  __Pyx_GOTREF(__pyx_t_11);
16236  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16237  } else
16238  #endif
16239  #if CYTHON_FAST_PYCCALL
16240  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
16241  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
16242  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 796, __pyx_L1_error)
16243  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16244  __Pyx_GOTREF(__pyx_t_11);
16245  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16246  } else
16247  #endif
16248  {
16249  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 796, __pyx_L1_error)
16250  __Pyx_GOTREF(__pyx_t_1);
16251  if (__pyx_t_6) {
16252  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
16253  }
16254  __Pyx_GIVEREF(__pyx_t_7);
16255  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
16256  __Pyx_INCREF(__pyx_n_s_d);
16257  __Pyx_GIVEREF(__pyx_n_s_d);
16258  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
16259  __pyx_t_7 = 0;
16260  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 796, __pyx_L1_error)
16261  __Pyx_GOTREF(__pyx_t_11);
16262  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16263  }
16264  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16265  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 796, __pyx_L1_error)
16266  __Pyx_GOTREF(__pyx_t_15);
16267  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__8, __pyx_t_11) < 0)) __PYX_ERR(1, 796, __pyx_L1_error)
16268  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16269  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16270 
16271  /* "ADR.pyx":797
16272  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16273  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16274  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
16275  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16276  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16277  */
16278  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 797, __pyx_L1_error)
16279  __Pyx_GOTREF(__pyx_t_15);
16280  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 797, __pyx_L1_error)
16281  __Pyx_GOTREF(__pyx_t_1);
16282  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16283  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 797, __pyx_L1_error)
16284  __Pyx_GOTREF(__pyx_t_15);
16285  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 797, __pyx_L1_error)
16286  __Pyx_GOTREF(__pyx_t_7);
16287  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16288  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 797, __pyx_L1_error)
16289  __Pyx_GOTREF(__pyx_t_15);
16290  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 797, __pyx_L1_error)
16291  __Pyx_GOTREF(__pyx_t_6);
16292  __Pyx_GIVEREF(__pyx_t_7);
16293  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
16294  __Pyx_GIVEREF(__pyx_t_15);
16295  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_15);
16296  __pyx_t_7 = 0;
16297  __pyx_t_15 = 0;
16298  __pyx_t_15 = NULL;
16299  __pyx_t_14 = 0;
16300  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
16301  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
16302  if (likely(__pyx_t_15)) {
16303  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
16304  __Pyx_INCREF(__pyx_t_15);
16305  __Pyx_INCREF(function);
16306  __Pyx_DECREF_SET(__pyx_t_1, function);
16307  __pyx_t_14 = 1;
16308  }
16309  }
16310  #if CYTHON_FAST_PYCALL
16311  if (PyFunction_Check(__pyx_t_1)) {
16312  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_6, __pyx_n_s_i};
16313  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 797, __pyx_L1_error)
16314  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16315  __Pyx_GOTREF(__pyx_t_11);
16316  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16317  } else
16318  #endif
16319  #if CYTHON_FAST_PYCCALL
16320  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
16321  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_6, __pyx_n_s_i};
16322  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 797, __pyx_L1_error)
16323  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
16324  __Pyx_GOTREF(__pyx_t_11);
16325  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16326  } else
16327  #endif
16328  {
16329  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 797, __pyx_L1_error)
16330  __Pyx_GOTREF(__pyx_t_7);
16331  if (__pyx_t_15) {
16332  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_15); __pyx_t_15 = NULL;
16333  }
16334  __Pyx_GIVEREF(__pyx_t_6);
16335  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_6);
16336  __Pyx_INCREF(__pyx_n_s_i);
16337  __Pyx_GIVEREF(__pyx_n_s_i);
16338  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_i);
16339  __pyx_t_6 = 0;
16340  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 797, __pyx_L1_error)
16341  __Pyx_GOTREF(__pyx_t_11);
16342  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16343  }
16344  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16345  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 797, __pyx_L1_error)
16346  __Pyx_GOTREF(__pyx_t_1);
16347  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__15, __pyx_t_11) < 0)) __PYX_ERR(1, 797, __pyx_L1_error)
16348  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16349  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16350 
16351  /* "ADR.pyx":798
16352  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16353  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16354  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16355  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16356  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16357  */
16358  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L1_error)
16359  __Pyx_GOTREF(__pyx_t_1);
16360  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 798, __pyx_L1_error)
16361  __Pyx_GOTREF(__pyx_t_7);
16362  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16363  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L1_error)
16364  __Pyx_GOTREF(__pyx_t_1);
16365  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 798, __pyx_L1_error)
16366  __Pyx_GOTREF(__pyx_t_6);
16367  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16368  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 798, __pyx_L1_error)
16369  __Pyx_GOTREF(__pyx_t_1);
16370  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 798, __pyx_L1_error)
16371  __Pyx_GOTREF(__pyx_t_15);
16372  __Pyx_GIVEREF(__pyx_t_6);
16373  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
16374  __Pyx_GIVEREF(__pyx_t_1);
16375  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_1);
16376  __pyx_t_6 = 0;
16377  __pyx_t_1 = 0;
16378  __pyx_t_1 = NULL;
16379  __pyx_t_14 = 0;
16380  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
16381  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
16382  if (likely(__pyx_t_1)) {
16383  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
16384  __Pyx_INCREF(__pyx_t_1);
16385  __Pyx_INCREF(function);
16386  __Pyx_DECREF_SET(__pyx_t_7, function);
16387  __pyx_t_14 = 1;
16388  }
16389  }
16390  #if CYTHON_FAST_PYCALL
16391  if (PyFunction_Check(__pyx_t_7)) {
16392  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
16393  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 798, __pyx_L1_error)
16394  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16395  __Pyx_GOTREF(__pyx_t_11);
16396  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16397  } else
16398  #endif
16399  #if CYTHON_FAST_PYCCALL
16400  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
16401  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
16402  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 798, __pyx_L1_error)
16403  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16404  __Pyx_GOTREF(__pyx_t_11);
16405  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16406  } else
16407  #endif
16408  {
16409  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 798, __pyx_L1_error)
16410  __Pyx_GOTREF(__pyx_t_6);
16411  if (__pyx_t_1) {
16412  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
16413  }
16414  __Pyx_GIVEREF(__pyx_t_15);
16415  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_t_15);
16416  __Pyx_INCREF(__pyx_n_s_d);
16417  __Pyx_GIVEREF(__pyx_n_s_d);
16418  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_n_s_d);
16419  __pyx_t_15 = 0;
16420  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 798, __pyx_L1_error)
16421  __Pyx_GOTREF(__pyx_t_11);
16422  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16423  }
16424  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16425  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 798, __pyx_L1_error)
16426  __Pyx_GOTREF(__pyx_t_7);
16427  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_tuple__16, __pyx_t_11) < 0)) __PYX_ERR(1, 798, __pyx_L1_error)
16428  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16429  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16430 
16431  /* "ADR.pyx":799
16432  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16433  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16434  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
16435  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16436  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16437  */
16438  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 799, __pyx_L1_error)
16439  __Pyx_GOTREF(__pyx_t_7);
16440  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 799, __pyx_L1_error)
16441  __Pyx_GOTREF(__pyx_t_6);
16442  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16443  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 799, __pyx_L1_error)
16444  __Pyx_GOTREF(__pyx_t_7);
16445  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 799, __pyx_L1_error)
16446  __Pyx_GOTREF(__pyx_t_15);
16447  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16448  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 799, __pyx_L1_error)
16449  __Pyx_GOTREF(__pyx_t_7);
16450  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 799, __pyx_L1_error)
16451  __Pyx_GOTREF(__pyx_t_1);
16452  __Pyx_GIVEREF(__pyx_t_15);
16453  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15);
16454  __Pyx_GIVEREF(__pyx_t_7);
16455  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
16456  __pyx_t_15 = 0;
16457  __pyx_t_7 = 0;
16458  __pyx_t_7 = NULL;
16459  __pyx_t_14 = 0;
16460  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16461  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
16462  if (likely(__pyx_t_7)) {
16463  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16464  __Pyx_INCREF(__pyx_t_7);
16465  __Pyx_INCREF(function);
16466  __Pyx_DECREF_SET(__pyx_t_6, function);
16467  __pyx_t_14 = 1;
16468  }
16469  }
16470  #if CYTHON_FAST_PYCALL
16471  if (PyFunction_Check(__pyx_t_6)) {
16472  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_i};
16473  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 799, __pyx_L1_error)
16474  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16475  __Pyx_GOTREF(__pyx_t_11);
16476  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16477  } else
16478  #endif
16479  #if CYTHON_FAST_PYCCALL
16480  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
16481  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_i};
16482  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 799, __pyx_L1_error)
16483  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16484  __Pyx_GOTREF(__pyx_t_11);
16485  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16486  } else
16487  #endif
16488  {
16489  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 799, __pyx_L1_error)
16490  __Pyx_GOTREF(__pyx_t_15);
16491  if (__pyx_t_7) {
16492  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
16493  }
16494  __Pyx_GIVEREF(__pyx_t_1);
16495  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_1);
16496  __Pyx_INCREF(__pyx_n_s_i);
16497  __Pyx_GIVEREF(__pyx_n_s_i);
16498  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_i);
16499  __pyx_t_1 = 0;
16500  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 799, __pyx_L1_error)
16501  __Pyx_GOTREF(__pyx_t_11);
16502  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16503  }
16504  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16505  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 799, __pyx_L1_error)
16506  __Pyx_GOTREF(__pyx_t_6);
16507  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_tuple__17, __pyx_t_11) < 0)) __PYX_ERR(1, 799, __pyx_L1_error)
16508  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16509  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16510 
16511  /* "ADR.pyx":800
16512  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16513  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16514  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16515  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16516  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16517  */
16518  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 800, __pyx_L1_error)
16519  __Pyx_GOTREF(__pyx_t_6);
16520  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 800, __pyx_L1_error)
16521  __Pyx_GOTREF(__pyx_t_15);
16522  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16523  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 800, __pyx_L1_error)
16524  __Pyx_GOTREF(__pyx_t_6);
16525  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 800, __pyx_L1_error)
16526  __Pyx_GOTREF(__pyx_t_1);
16527  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16528  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 800, __pyx_L1_error)
16529  __Pyx_GOTREF(__pyx_t_6);
16530  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 800, __pyx_L1_error)
16531  __Pyx_GOTREF(__pyx_t_7);
16532  __Pyx_GIVEREF(__pyx_t_1);
16533  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
16534  __Pyx_GIVEREF(__pyx_t_6);
16535  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
16536  __pyx_t_1 = 0;
16537  __pyx_t_6 = 0;
16538  __pyx_t_6 = NULL;
16539  __pyx_t_14 = 0;
16540  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
16541  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
16542  if (likely(__pyx_t_6)) {
16543  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
16544  __Pyx_INCREF(__pyx_t_6);
16545  __Pyx_INCREF(function);
16546  __Pyx_DECREF_SET(__pyx_t_15, function);
16547  __pyx_t_14 = 1;
16548  }
16549  }
16550  #if CYTHON_FAST_PYCALL
16551  if (PyFunction_Check(__pyx_t_15)) {
16552  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
16553  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 800, __pyx_L1_error)
16554  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16555  __Pyx_GOTREF(__pyx_t_11);
16556  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16557  } else
16558  #endif
16559  #if CYTHON_FAST_PYCCALL
16560  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
16561  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
16562  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 800, __pyx_L1_error)
16563  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16564  __Pyx_GOTREF(__pyx_t_11);
16565  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16566  } else
16567  #endif
16568  {
16569  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 800, __pyx_L1_error)
16570  __Pyx_GOTREF(__pyx_t_1);
16571  if (__pyx_t_6) {
16572  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
16573  }
16574  __Pyx_GIVEREF(__pyx_t_7);
16575  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
16576  __Pyx_INCREF(__pyx_n_s_d);
16577  __Pyx_GIVEREF(__pyx_n_s_d);
16578  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
16579  __pyx_t_7 = 0;
16580  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 800, __pyx_L1_error)
16581  __Pyx_GOTREF(__pyx_t_11);
16582  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16583  }
16584  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16585  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 800, __pyx_L1_error)
16586  __Pyx_GOTREF(__pyx_t_15);
16587  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__18, __pyx_t_11) < 0)) __PYX_ERR(1, 800, __pyx_L1_error)
16588  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16589  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16590 
16591  /* "ADR.pyx":801
16592  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
16593  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16594  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
16595  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16596  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16597  */
16598  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 801, __pyx_L1_error)
16599  __Pyx_GOTREF(__pyx_t_15);
16600  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L1_error)
16601  __Pyx_GOTREF(__pyx_t_1);
16602  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16603  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 801, __pyx_L1_error)
16604  __Pyx_GOTREF(__pyx_t_15);
16605  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 801, __pyx_L1_error)
16606  __Pyx_GOTREF(__pyx_t_7);
16607  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16608  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 801, __pyx_L1_error)
16609  __Pyx_GOTREF(__pyx_t_15);
16610  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 801, __pyx_L1_error)
16611  __Pyx_GOTREF(__pyx_t_6);
16612  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 801, __pyx_L1_error)
16613  __Pyx_GOTREF(__pyx_t_2);
16614  __Pyx_GIVEREF(__pyx_t_7);
16615  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
16616  __Pyx_GIVEREF(__pyx_t_15);
16617  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15);
16618  __Pyx_GIVEREF(__pyx_t_6);
16619  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
16620  __pyx_t_7 = 0;
16621  __pyx_t_15 = 0;
16622  __pyx_t_6 = 0;
16623  __pyx_t_6 = NULL;
16624  __pyx_t_14 = 0;
16625  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
16626  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
16627  if (likely(__pyx_t_6)) {
16628  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
16629  __Pyx_INCREF(__pyx_t_6);
16630  __Pyx_INCREF(function);
16631  __Pyx_DECREF_SET(__pyx_t_1, function);
16632  __pyx_t_14 = 1;
16633  }
16634  }
16635  #if CYTHON_FAST_PYCALL
16636  if (PyFunction_Check(__pyx_t_1)) {
16637  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_n_s_d};
16638  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 801, __pyx_L1_error)
16639  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16640  __Pyx_GOTREF(__pyx_t_11);
16641  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16642  } else
16643  #endif
16644  #if CYTHON_FAST_PYCCALL
16645  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
16646  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_n_s_d};
16647  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 801, __pyx_L1_error)
16648  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16649  __Pyx_GOTREF(__pyx_t_11);
16650  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16651  } else
16652  #endif
16653  {
16654  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 801, __pyx_L1_error)
16655  __Pyx_GOTREF(__pyx_t_15);
16656  if (__pyx_t_6) {
16657  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6); __pyx_t_6 = NULL;
16658  }
16659  __Pyx_GIVEREF(__pyx_t_2);
16660  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_2);
16661  __Pyx_INCREF(__pyx_n_s_d);
16662  __Pyx_GIVEREF(__pyx_n_s_d);
16663  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
16664  __pyx_t_2 = 0;
16665  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 801, __pyx_L1_error)
16666  __Pyx_GOTREF(__pyx_t_11);
16667  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16668  }
16669  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16670  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 801, __pyx_L1_error)
16671  __Pyx_GOTREF(__pyx_t_1);
16672  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__9, __pyx_t_11) < 0)) __PYX_ERR(1, 801, __pyx_L1_error)
16673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16674  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16675 
16676  /* "ADR.pyx":802
16677  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16678  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16679  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
16680  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16681  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16682  */
16683  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 802, __pyx_L1_error)
16684  __Pyx_GOTREF(__pyx_t_1);
16685  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 802, __pyx_L1_error)
16686  __Pyx_GOTREF(__pyx_t_15);
16687  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16688  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 802, __pyx_L1_error)
16689  __Pyx_GOTREF(__pyx_t_1);
16690  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 802, __pyx_L1_error)
16691  __Pyx_GOTREF(__pyx_t_2);
16692  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16693  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 802, __pyx_L1_error)
16694  __Pyx_GOTREF(__pyx_t_1);
16695  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 802, __pyx_L1_error)
16696  __Pyx_GOTREF(__pyx_t_6);
16697  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 802, __pyx_L1_error)
16698  __Pyx_GOTREF(__pyx_t_7);
16699  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16700  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_tuple__4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 802, __pyx_L1_error)
16701  __Pyx_GOTREF(__pyx_t_6);
16702  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16703  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 802, __pyx_L1_error)
16704  __Pyx_GOTREF(__pyx_t_7);
16705  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16706  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 802, __pyx_L1_error)
16707  __Pyx_GOTREF(__pyx_t_6);
16708  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16709  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 802, __pyx_L1_error)
16710  __Pyx_GOTREF(__pyx_t_7);
16711  __Pyx_GIVEREF(__pyx_t_2);
16712  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
16713  __Pyx_GIVEREF(__pyx_t_1);
16714  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
16715  __Pyx_GIVEREF(__pyx_t_6);
16716  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
16717  __pyx_t_2 = 0;
16718  __pyx_t_1 = 0;
16719  __pyx_t_6 = 0;
16720  __pyx_t_6 = NULL;
16721  __pyx_t_14 = 0;
16722  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
16723  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
16724  if (likely(__pyx_t_6)) {
16725  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
16726  __Pyx_INCREF(__pyx_t_6);
16727  __Pyx_INCREF(function);
16728  __Pyx_DECREF_SET(__pyx_t_15, function);
16729  __pyx_t_14 = 1;
16730  }
16731  }
16732  #if CYTHON_FAST_PYCALL
16733  if (PyFunction_Check(__pyx_t_15)) {
16734  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
16735  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 802, __pyx_L1_error)
16736  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16737  __Pyx_GOTREF(__pyx_t_11);
16738  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16739  } else
16740  #endif
16741  #if CYTHON_FAST_PYCCALL
16742  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
16743  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_n_s_d};
16744  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 802, __pyx_L1_error)
16745  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16746  __Pyx_GOTREF(__pyx_t_11);
16747  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16748  } else
16749  #endif
16750  {
16751  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 802, __pyx_L1_error)
16752  __Pyx_GOTREF(__pyx_t_1);
16753  if (__pyx_t_6) {
16754  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
16755  }
16756  __Pyx_GIVEREF(__pyx_t_7);
16757  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_7);
16758  __Pyx_INCREF(__pyx_n_s_d);
16759  __Pyx_GIVEREF(__pyx_n_s_d);
16760  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
16761  __pyx_t_7 = 0;
16762  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 802, __pyx_L1_error)
16763  __Pyx_GOTREF(__pyx_t_11);
16764  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16765  }
16766  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16767  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 802, __pyx_L1_error)
16768  __Pyx_GOTREF(__pyx_t_15);
16769  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__10, __pyx_t_11) < 0)) __PYX_ERR(1, 802, __pyx_L1_error)
16770  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16771  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16772 
16773  /* "ADR.pyx":803
16774  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16775  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16776  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d') # <<<<<<<<<<<<<<
16777  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16778  *
16779  */
16780  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 803, __pyx_L1_error)
16781  __Pyx_GOTREF(__pyx_t_15);
16782  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 803, __pyx_L1_error)
16783  __Pyx_GOTREF(__pyx_t_1);
16784  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16785  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 803, __pyx_L1_error)
16786  __Pyx_GOTREF(__pyx_t_15);
16787  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 803, __pyx_L1_error)
16788  __Pyx_GOTREF(__pyx_t_7);
16789  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16790  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 803, __pyx_L1_error)
16791  __Pyx_GOTREF(__pyx_t_15);
16792  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 803, __pyx_L1_error)
16793  __Pyx_GOTREF(__pyx_t_6);
16794  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 803, __pyx_L1_error)
16795  __Pyx_GOTREF(__pyx_t_2);
16796  __Pyx_GIVEREF(__pyx_t_7);
16797  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
16798  __Pyx_GIVEREF(__pyx_t_15);
16799  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15);
16800  __Pyx_GIVEREF(__pyx_t_6);
16801  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
16802  __pyx_t_7 = 0;
16803  __pyx_t_15 = 0;
16804  __pyx_t_6 = 0;
16805  __pyx_t_6 = NULL;
16806  __pyx_t_14 = 0;
16807  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
16808  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
16809  if (likely(__pyx_t_6)) {
16810  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
16811  __Pyx_INCREF(__pyx_t_6);
16812  __Pyx_INCREF(function);
16813  __Pyx_DECREF_SET(__pyx_t_1, function);
16814  __pyx_t_14 = 1;
16815  }
16816  }
16817  #if CYTHON_FAST_PYCALL
16818  if (PyFunction_Check(__pyx_t_1)) {
16819  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_n_s_d};
16820  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 803, __pyx_L1_error)
16821  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16822  __Pyx_GOTREF(__pyx_t_11);
16823  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16824  } else
16825  #endif
16826  #if CYTHON_FAST_PYCCALL
16827  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
16828  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_n_s_d};
16829  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 803, __pyx_L1_error)
16830  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16831  __Pyx_GOTREF(__pyx_t_11);
16832  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16833  } else
16834  #endif
16835  {
16836  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 803, __pyx_L1_error)
16837  __Pyx_GOTREF(__pyx_t_15);
16838  if (__pyx_t_6) {
16839  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6); __pyx_t_6 = NULL;
16840  }
16841  __Pyx_GIVEREF(__pyx_t_2);
16842  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_2);
16843  __Pyx_INCREF(__pyx_n_s_d);
16844  __Pyx_GIVEREF(__pyx_n_s_d);
16845  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
16846  __pyx_t_2 = 0;
16847  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 803, __pyx_L1_error)
16848  __Pyx_GOTREF(__pyx_t_11);
16849  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16850  }
16851  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16852  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 803, __pyx_L1_error)
16853  __Pyx_GOTREF(__pyx_t_1);
16854  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_tuple__11, __pyx_t_11) < 0)) __PYX_ERR(1, 803, __pyx_L1_error)
16855  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16856  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16857 
16858  /* "ADR.pyx":804
16859  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
16860  * self.ebqe[('df',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
16861  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
16862  *
16863  * self.points_elementBoundaryQuadrature= set()
16864  */
16865  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __pyx_L1_error)
16866  __Pyx_GOTREF(__pyx_t_1);
16867  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 804, __pyx_L1_error)
16868  __Pyx_GOTREF(__pyx_t_15);
16869  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16870  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __pyx_L1_error)
16871  __Pyx_GOTREF(__pyx_t_1);
16872  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 804, __pyx_L1_error)
16873  __Pyx_GOTREF(__pyx_t_2);
16874  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16875  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __pyx_L1_error)
16876  __Pyx_GOTREF(__pyx_t_1);
16877  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 804, __pyx_L1_error)
16878  __Pyx_GOTREF(__pyx_t_6);
16879  __Pyx_GIVEREF(__pyx_t_2);
16880  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
16881  __Pyx_GIVEREF(__pyx_t_1);
16882  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
16883  __pyx_t_2 = 0;
16884  __pyx_t_1 = 0;
16885  __pyx_t_1 = NULL;
16886  __pyx_t_14 = 0;
16887  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
16888  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_15);
16889  if (likely(__pyx_t_1)) {
16890  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
16891  __Pyx_INCREF(__pyx_t_1);
16892  __Pyx_INCREF(function);
16893  __Pyx_DECREF_SET(__pyx_t_15, function);
16894  __pyx_t_14 = 1;
16895  }
16896  }
16897  #if CYTHON_FAST_PYCALL
16898  if (PyFunction_Check(__pyx_t_15)) {
16899  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_6, __pyx_n_s_d};
16900  __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 804, __pyx_L1_error)
16901  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16902  __Pyx_GOTREF(__pyx_t_11);
16903  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16904  } else
16905  #endif
16906  #if CYTHON_FAST_PYCCALL
16907  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
16908  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_6, __pyx_n_s_d};
16909  __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 804, __pyx_L1_error)
16910  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16911  __Pyx_GOTREF(__pyx_t_11);
16912  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16913  } else
16914  #endif
16915  {
16916  __pyx_t_2 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 804, __pyx_L1_error)
16917  __Pyx_GOTREF(__pyx_t_2);
16918  if (__pyx_t_1) {
16919  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
16920  }
16921  __Pyx_GIVEREF(__pyx_t_6);
16922  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_14, __pyx_t_6);
16923  __Pyx_INCREF(__pyx_n_s_d);
16924  __Pyx_GIVEREF(__pyx_n_s_d);
16925  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_14, __pyx_n_s_d);
16926  __pyx_t_6 = 0;
16927  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 804, __pyx_L1_error)
16928  __Pyx_GOTREF(__pyx_t_11);
16929  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16930  }
16931  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16932  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 804, __pyx_L1_error)
16933  __Pyx_GOTREF(__pyx_t_15);
16934  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_tuple__12, __pyx_t_11) < 0)) __PYX_ERR(1, 804, __pyx_L1_error)
16935  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16936  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16937 
16938  /* "ADR.pyx":806
16939  * self.ebqe[('r',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
16940  *
16941  * self.points_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
16942  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
16943  * self.vectors_elementBoundaryQuadrature= set()
16944  */
16945  __pyx_t_11 = PySet_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 806, __pyx_L1_error)
16946  __Pyx_GOTREF(__pyx_t_11);
16947  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_points_elementBoundaryQuadrature, __pyx_t_11) < 0) __PYX_ERR(1, 806, __pyx_L1_error)
16948  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16949 
16950  /* "ADR.pyx":807
16951  *
16952  * self.points_elementBoundaryQuadrature= set()
16953  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)]) # <<<<<<<<<<<<<<
16954  * self.vectors_elementBoundaryQuadrature= set()
16955  * self.tensors_elementBoundaryQuadrature= set()
16956  */
16957  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 807, __pyx_L1_error)
16958  __Pyx_GOTREF(__pyx_t_11);
16959  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 807, __pyx_L1_error)
16960  __Pyx_GOTREF(__pyx_t_15);
16961  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 807, __pyx_L1_error)
16962  __Pyx_GOTREF(__pyx_t_2);
16963  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
16964  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
16965  __pyx_t_15 = __pyx_t_2; __Pyx_INCREF(__pyx_t_15); __pyx_t_4 = 0;
16966  __pyx_t_5 = NULL;
16967  } else {
16968  __pyx_t_4 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 807, __pyx_L1_error)
16969  __Pyx_GOTREF(__pyx_t_15);
16970  __pyx_t_5 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 807, __pyx_L1_error)
16971  }
16972  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16973  for (;;) {
16974  if (likely(!__pyx_t_5)) {
16975  if (likely(PyList_CheckExact(__pyx_t_15))) {
16976  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_15)) break;
16977  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16978  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 807, __pyx_L1_error)
16979  #else
16980  __pyx_t_2 = PySequence_ITEM(__pyx_t_15, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 807, __pyx_L1_error)
16981  __Pyx_GOTREF(__pyx_t_2);
16982  #endif
16983  } else {
16984  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
16985  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16986  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 807, __pyx_L1_error)
16987  #else
16988  __pyx_t_2 = PySequence_ITEM(__pyx_t_15, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 807, __pyx_L1_error)
16989  __Pyx_GOTREF(__pyx_t_2);
16990  #endif
16991  }
16992  } else {
16993  __pyx_t_2 = __pyx_t_5(__pyx_t_15);
16994  if (unlikely(!__pyx_t_2)) {
16995  PyObject* exc_type = PyErr_Occurred();
16996  if (exc_type) {
16997  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
16998  else __PYX_ERR(1, 807, __pyx_L1_error)
16999  }
17000  break;
17001  }
17002  __Pyx_GOTREF(__pyx_t_2);
17003  }
17004  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_2);
17005  __pyx_t_2 = 0;
17006  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 807, __pyx_L1_error)
17007  __Pyx_GOTREF(__pyx_t_2);
17008  __Pyx_INCREF(__pyx_n_s_u);
17009  __Pyx_GIVEREF(__pyx_n_s_u);
17010  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_u);
17011  __Pyx_INCREF(__pyx_v_ci);
17012  __Pyx_GIVEREF(__pyx_v_ci);
17013  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ci);
17014  if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 807, __pyx_L1_error)
17015  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17016  }
17017  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17018  __pyx_t_15 = PySet_New(__pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 807, __pyx_L1_error)
17019  __Pyx_GOTREF(__pyx_t_15);
17020  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17021  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_scalars_elementBoundaryQuadratur, __pyx_t_15) < 0) __PYX_ERR(1, 807, __pyx_L1_error)
17022  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17023 
17024  /* "ADR.pyx":808
17025  * self.points_elementBoundaryQuadrature= set()
17026  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17027  * self.vectors_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17028  * self.tensors_elementBoundaryQuadrature= set()
17029  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17030  */
17031  __pyx_t_15 = PySet_New(0); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 808, __pyx_L1_error)
17032  __Pyx_GOTREF(__pyx_t_15);
17033  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vectors_elementBoundaryQuadratur, __pyx_t_15) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
17034  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17035 
17036  /* "ADR.pyx":809
17037  * self.scalars_elementBoundaryQuadrature= set([('u',ci) for ci in range(self.nc)])
17038  * self.vectors_elementBoundaryQuadrature= set()
17039  * self.tensors_elementBoundaryQuadrature= set() # <<<<<<<<<<<<<<
17040  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17041  * self.inflowBoundaryBC = {}
17042  */
17043  __pyx_t_15 = PySet_New(0); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 809, __pyx_L1_error)
17044  __Pyx_GOTREF(__pyx_t_15);
17045  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tensors_elementBoundaryQuadratur, __pyx_t_15) < 0) __PYX_ERR(1, 809, __pyx_L1_error)
17046  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17047 
17048  /* "ADR.pyx":810
17049  * self.vectors_elementBoundaryQuadrature= set()
17050  * self.tensors_elementBoundaryQuadrature= set()
17051  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
17052  * self.inflowBoundaryBC = {}
17053  * self.inflowBoundaryBC_values = {}
17054  */
17055  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 810, __pyx_L1_error)
17056  __Pyx_GOTREF(__pyx_t_15);
17057  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_memory); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 810, __pyx_L1_error)
17058  __Pyx_GOTREF(__pyx_t_11);
17059  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 810, __pyx_L1_error)
17060  __Pyx_GOTREF(__pyx_t_2);
17061  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17062  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 810, __pyx_L1_error)
17063  __Pyx_GOTREF(__pyx_t_11);
17064  __Pyx_GIVEREF(__pyx_t_2);
17065  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
17066  __pyx_t_2 = 0;
17067  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 810, __pyx_L1_error)
17068  __Pyx_GOTREF(__pyx_t_2);
17069  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(1, 810, __pyx_L1_error)
17070  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 810, __pyx_L1_error)
17071  __Pyx_GOTREF(__pyx_t_6);
17072  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17073  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17074  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17075  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17076 
17077  /* "ADR.pyx":811
17078  * self.tensors_elementBoundaryQuadrature= set()
17079  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17080  * self.inflowBoundaryBC = {} # <<<<<<<<<<<<<<
17081  * self.inflowBoundaryBC_values = {}
17082  * self.inflowFlux = {}
17083  */
17084  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 811, __pyx_L1_error)
17085  __Pyx_GOTREF(__pyx_t_6);
17086  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC, __pyx_t_6) < 0) __PYX_ERR(1, 811, __pyx_L1_error)
17087  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17088 
17089  /* "ADR.pyx":812
17090  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4)
17091  * self.inflowBoundaryBC = {}
17092  * self.inflowBoundaryBC_values = {} # <<<<<<<<<<<<<<
17093  * self.inflowFlux = {}
17094  * for cj in range(self.nc):
17095  */
17096  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 812, __pyx_L1_error)
17097  __Pyx_GOTREF(__pyx_t_6);
17098  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC_values, __pyx_t_6) < 0) __PYX_ERR(1, 812, __pyx_L1_error)
17099  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17100 
17101  /* "ADR.pyx":813
17102  * self.inflowBoundaryBC = {}
17103  * self.inflowBoundaryBC_values = {}
17104  * self.inflowFlux = {} # <<<<<<<<<<<<<<
17105  * for cj in range(self.nc):
17106  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17107  */
17108  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 813, __pyx_L1_error)
17109  __Pyx_GOTREF(__pyx_t_6);
17110  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_inflowFlux, __pyx_t_6) < 0) __PYX_ERR(1, 813, __pyx_L1_error)
17111  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17112 
17113  /* "ADR.pyx":814
17114  * self.inflowBoundaryBC_values = {}
17115  * self.inflowFlux = {}
17116  * for cj in range(self.nc): # <<<<<<<<<<<<<<
17117  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17118  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17119  */
17120  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 814, __pyx_L1_error)
17121  __Pyx_GOTREF(__pyx_t_6);
17122  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 814, __pyx_L1_error)
17123  __Pyx_GOTREF(__pyx_t_2);
17124  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17125  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
17126  __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
17127  __pyx_t_5 = NULL;
17128  } else {
17129  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 814, __pyx_L1_error)
17130  __Pyx_GOTREF(__pyx_t_6);
17131  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 814, __pyx_L1_error)
17132  }
17133  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17134  for (;;) {
17135  if (likely(!__pyx_t_5)) {
17136  if (likely(PyList_CheckExact(__pyx_t_6))) {
17137  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
17138  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17139  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 814, __pyx_L1_error)
17140  #else
17141  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 814, __pyx_L1_error)
17142  __Pyx_GOTREF(__pyx_t_2);
17143  #endif
17144  } else {
17145  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
17146  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17147  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 814, __pyx_L1_error)
17148  #else
17149  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 814, __pyx_L1_error)
17150  __Pyx_GOTREF(__pyx_t_2);
17151  #endif
17152  }
17153  } else {
17154  __pyx_t_2 = __pyx_t_5(__pyx_t_6);
17155  if (unlikely(!__pyx_t_2)) {
17156  PyObject* exc_type = PyErr_Occurred();
17157  if (exc_type) {
17158  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17159  else __PYX_ERR(1, 814, __pyx_L1_error)
17160  }
17161  break;
17162  }
17163  __Pyx_GOTREF(__pyx_t_2);
17164  }
17165  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_2);
17166  __pyx_t_2 = 0;
17167 
17168  /* "ADR.pyx":815
17169  * self.inflowFlux = {}
17170  * for cj in range(self.nc):
17171  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i') # <<<<<<<<<<<<<<
17172  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17173  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17174  */
17175  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 815, __pyx_L1_error)
17176  __Pyx_GOTREF(__pyx_t_11);
17177  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 815, __pyx_L1_error)
17178  __Pyx_GOTREF(__pyx_t_15);
17179  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17180  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 815, __pyx_L1_error)
17181  __Pyx_GOTREF(__pyx_t_11);
17182  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 815, __pyx_L1_error)
17183  __Pyx_GOTREF(__pyx_t_1);
17184  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17185  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 815, __pyx_L1_error)
17186  __Pyx_GOTREF(__pyx_t_11);
17187  __Pyx_GIVEREF(__pyx_t_1);
17188  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
17189  __pyx_t_1 = 0;
17190  __pyx_t_1 = NULL;
17191  __pyx_t_14 = 0;
17192  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
17193  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_15);
17194  if (likely(__pyx_t_1)) {
17195  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
17196  __Pyx_INCREF(__pyx_t_1);
17197  __Pyx_INCREF(function);
17198  __Pyx_DECREF_SET(__pyx_t_15, function);
17199  __pyx_t_14 = 1;
17200  }
17201  }
17202  #if CYTHON_FAST_PYCALL
17203  if (PyFunction_Check(__pyx_t_15)) {
17204  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_11, __pyx_n_s_i};
17205  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 815, __pyx_L1_error)
17206  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17207  __Pyx_GOTREF(__pyx_t_2);
17208  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17209  } else
17210  #endif
17211  #if CYTHON_FAST_PYCCALL
17212  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
17213  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_11, __pyx_n_s_i};
17214  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 815, __pyx_L1_error)
17215  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17216  __Pyx_GOTREF(__pyx_t_2);
17217  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17218  } else
17219  #endif
17220  {
17221  __pyx_t_7 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 815, __pyx_L1_error)
17222  __Pyx_GOTREF(__pyx_t_7);
17223  if (__pyx_t_1) {
17224  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
17225  }
17226  __Pyx_GIVEREF(__pyx_t_11);
17227  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_14, __pyx_t_11);
17228  __Pyx_INCREF(__pyx_n_s_i);
17229  __Pyx_GIVEREF(__pyx_n_s_i);
17230  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_14, __pyx_n_s_i);
17231  __pyx_t_11 = 0;
17232  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 815, __pyx_L1_error)
17233  __Pyx_GOTREF(__pyx_t_2);
17234  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17235  }
17236  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17237  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 815, __pyx_L1_error)
17238  __Pyx_GOTREF(__pyx_t_15);
17239  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_v_cj, __pyx_t_2) < 0)) __PYX_ERR(1, 815, __pyx_L1_error)
17240  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17241  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17242 
17243  /* "ADR.pyx":816
17244  * for cj in range(self.nc):
17245  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17246  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d') # <<<<<<<<<<<<<<
17247  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17248  * self.internalNodes = set(range(self.mesh.nNodes_global))
17249  */
17250  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 816, __pyx_L1_error)
17251  __Pyx_GOTREF(__pyx_t_15);
17252  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 816, __pyx_L1_error)
17253  __Pyx_GOTREF(__pyx_t_7);
17254  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17255  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 816, __pyx_L1_error)
17256  __Pyx_GOTREF(__pyx_t_15);
17257  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 816, __pyx_L1_error)
17258  __Pyx_GOTREF(__pyx_t_11);
17259  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17260  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nDOF_trial_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 816, __pyx_L1_error)
17261  __Pyx_GOTREF(__pyx_t_15);
17262  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_15, __pyx_v_cj); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 816, __pyx_L1_error)
17263  __Pyx_GOTREF(__pyx_t_1);
17264  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17265  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 816, __pyx_L1_error)
17266  __Pyx_GOTREF(__pyx_t_15);
17267  __Pyx_GIVEREF(__pyx_t_11);
17268  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_11);
17269  __Pyx_GIVEREF(__pyx_t_1);
17270  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_1);
17271  __pyx_t_11 = 0;
17272  __pyx_t_1 = 0;
17273  __pyx_t_1 = NULL;
17274  __pyx_t_14 = 0;
17275  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
17276  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
17277  if (likely(__pyx_t_1)) {
17278  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
17279  __Pyx_INCREF(__pyx_t_1);
17280  __Pyx_INCREF(function);
17281  __Pyx_DECREF_SET(__pyx_t_7, function);
17282  __pyx_t_14 = 1;
17283  }
17284  }
17285  #if CYTHON_FAST_PYCALL
17286  if (PyFunction_Check(__pyx_t_7)) {
17287  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
17288  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 816, __pyx_L1_error)
17289  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17290  __Pyx_GOTREF(__pyx_t_2);
17291  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17292  } else
17293  #endif
17294  #if CYTHON_FAST_PYCCALL
17295  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
17296  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_n_s_d};
17297  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 816, __pyx_L1_error)
17298  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17299  __Pyx_GOTREF(__pyx_t_2);
17300  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17301  } else
17302  #endif
17303  {
17304  __pyx_t_11 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 816, __pyx_L1_error)
17305  __Pyx_GOTREF(__pyx_t_11);
17306  if (__pyx_t_1) {
17307  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
17308  }
17309  __Pyx_GIVEREF(__pyx_t_15);
17310  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_14, __pyx_t_15);
17311  __Pyx_INCREF(__pyx_n_s_d);
17312  __Pyx_GIVEREF(__pyx_n_s_d);
17313  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_14, __pyx_n_s_d);
17314  __pyx_t_15 = 0;
17315  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 816, __pyx_L1_error)
17316  __Pyx_GOTREF(__pyx_t_2);
17317  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17318  }
17319  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17320  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowBoundaryBC_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 816, __pyx_L1_error)
17321  __Pyx_GOTREF(__pyx_t_7);
17322  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_cj, __pyx_t_2) < 0)) __PYX_ERR(1, 816, __pyx_L1_error)
17323  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17324  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17325 
17326  /* "ADR.pyx":817
17327  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17328  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17329  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
17330  * self.internalNodes = set(range(self.mesh.nNodes_global))
17331  * #identify the internal nodes this is ought to be in mesh
17332  */
17333  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 817, __pyx_L1_error)
17334  __Pyx_GOTREF(__pyx_t_7);
17335  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 817, __pyx_L1_error)
17336  __Pyx_GOTREF(__pyx_t_11);
17337  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17338  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 817, __pyx_L1_error)
17339  __Pyx_GOTREF(__pyx_t_7);
17340  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 817, __pyx_L1_error)
17341  __Pyx_GOTREF(__pyx_t_15);
17342  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17343  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 817, __pyx_L1_error)
17344  __Pyx_GOTREF(__pyx_t_7);
17345  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 817, __pyx_L1_error)
17346  __Pyx_GOTREF(__pyx_t_1);
17347  __Pyx_GIVEREF(__pyx_t_15);
17348  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15);
17349  __Pyx_GIVEREF(__pyx_t_7);
17350  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
17351  __pyx_t_15 = 0;
17352  __pyx_t_7 = 0;
17353  __pyx_t_7 = NULL;
17354  __pyx_t_14 = 0;
17355  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
17356  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11);
17357  if (likely(__pyx_t_7)) {
17358  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
17359  __Pyx_INCREF(__pyx_t_7);
17360  __Pyx_INCREF(function);
17361  __Pyx_DECREF_SET(__pyx_t_11, function);
17362  __pyx_t_14 = 1;
17363  }
17364  }
17365  #if CYTHON_FAST_PYCALL
17366  if (PyFunction_Check(__pyx_t_11)) {
17367  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
17368  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 817, __pyx_L1_error)
17369  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17370  __Pyx_GOTREF(__pyx_t_2);
17371  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17372  } else
17373  #endif
17374  #if CYTHON_FAST_PYCCALL
17375  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
17376  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_n_s_d};
17377  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 817, __pyx_L1_error)
17378  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17379  __Pyx_GOTREF(__pyx_t_2);
17380  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17381  } else
17382  #endif
17383  {
17384  __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 817, __pyx_L1_error)
17385  __Pyx_GOTREF(__pyx_t_15);
17386  if (__pyx_t_7) {
17387  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL;
17388  }
17389  __Pyx_GIVEREF(__pyx_t_1);
17390  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_1);
17391  __Pyx_INCREF(__pyx_n_s_d);
17392  __Pyx_GIVEREF(__pyx_n_s_d);
17393  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_n_s_d);
17394  __pyx_t_1 = 0;
17395  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 817, __pyx_L1_error)
17396  __Pyx_GOTREF(__pyx_t_2);
17397  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17398  }
17399  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17400  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_inflowFlux); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 817, __pyx_L1_error)
17401  __Pyx_GOTREF(__pyx_t_11);
17402  if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_v_cj, __pyx_t_2) < 0)) __PYX_ERR(1, 817, __pyx_L1_error)
17403  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17404  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17405 
17406  /* "ADR.pyx":814
17407  * self.inflowBoundaryBC_values = {}
17408  * self.inflowFlux = {}
17409  * for cj in range(self.nc): # <<<<<<<<<<<<<<
17410  * self.inflowBoundaryBC[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,),'i')
17411  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17412  */
17413  }
17414  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17415 
17416  /* "ADR.pyx":818
17417  * self.inflowBoundaryBC_values[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nDOF_trial_element[cj]),'d')
17418  * self.inflowFlux[cj] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
17419  * self.internalNodes = set(range(self.mesh.nNodes_global)) # <<<<<<<<<<<<<<
17420  * #identify the internal nodes this is ought to be in mesh
17421  * ##\todo move this to mesh
17422  */
17423  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 818, __pyx_L1_error)
17424  __Pyx_GOTREF(__pyx_t_6);
17425  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 818, __pyx_L1_error)
17426  __Pyx_GOTREF(__pyx_t_2);
17427  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17428  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 818, __pyx_L1_error)
17429  __Pyx_GOTREF(__pyx_t_6);
17430  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17431  __pyx_t_2 = PySet_New(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 818, __pyx_L1_error)
17432  __Pyx_GOTREF(__pyx_t_2);
17433  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17434  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, __pyx_t_2) < 0) __PYX_ERR(1, 818, __pyx_L1_error)
17435  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17436 
17437  /* "ADR.pyx":821
17438  * #identify the internal nodes this is ought to be in mesh
17439  * ##\todo move this to mesh
17440  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
17441  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17442  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17443  */
17444  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 821, __pyx_L1_error)
17445  __Pyx_GOTREF(__pyx_t_2);
17446  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 821, __pyx_L1_error)
17447  __Pyx_GOTREF(__pyx_t_6);
17448  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17449  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 821, __pyx_L1_error)
17450  __Pyx_GOTREF(__pyx_t_2);
17451  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17452  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
17453  __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
17454  __pyx_t_5 = NULL;
17455  } else {
17456  __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 821, __pyx_L1_error)
17457  __Pyx_GOTREF(__pyx_t_6);
17458  __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 821, __pyx_L1_error)
17459  }
17460  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17461  for (;;) {
17462  if (likely(!__pyx_t_5)) {
17463  if (likely(PyList_CheckExact(__pyx_t_6))) {
17464  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
17465  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17466  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 821, __pyx_L1_error)
17467  #else
17468  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 821, __pyx_L1_error)
17469  __Pyx_GOTREF(__pyx_t_2);
17470  #endif
17471  } else {
17472  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
17473  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17474  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 821, __pyx_L1_error)
17475  #else
17476  __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 821, __pyx_L1_error)
17477  __Pyx_GOTREF(__pyx_t_2);
17478  #endif
17479  }
17480  } else {
17481  __pyx_t_2 = __pyx_t_5(__pyx_t_6);
17482  if (unlikely(!__pyx_t_2)) {
17483  PyObject* exc_type = PyErr_Occurred();
17484  if (exc_type) {
17485  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17486  else __PYX_ERR(1, 821, __pyx_L1_error)
17487  }
17488  break;
17489  }
17490  __Pyx_GOTREF(__pyx_t_2);
17491  }
17492  __Pyx_XDECREF_SET(__pyx_v_ebNE, __pyx_t_2);
17493  __pyx_t_2 = 0;
17494 
17495  /* "ADR.pyx":822
17496  * ##\todo move this to mesh
17497  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
17498  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE] # <<<<<<<<<<<<<<
17499  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17500  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17501  */
17502  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 822, __pyx_L1_error)
17503  __Pyx_GOTREF(__pyx_t_2);
17504  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 822, __pyx_L1_error)
17505  __Pyx_GOTREF(__pyx_t_11);
17506  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17507  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_v_ebNE); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 822, __pyx_L1_error)
17508  __Pyx_GOTREF(__pyx_t_2);
17509  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17510  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_2);
17511  __pyx_t_2 = 0;
17512 
17513  /* "ADR.pyx":823
17514  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
17515  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17516  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0] # <<<<<<<<<<<<<<
17517  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17518  * for i in range(self.mesh.nNodes_element):
17519  */
17520  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 823, __pyx_L1_error)
17521  __Pyx_GOTREF(__pyx_t_2);
17522  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 823, __pyx_L1_error)
17523  __Pyx_GOTREF(__pyx_t_11);
17524  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17525  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 823, __pyx_L1_error)
17526  __Pyx_GOTREF(__pyx_t_2);
17527  __Pyx_INCREF(__pyx_v_ebN);
17528  __Pyx_GIVEREF(__pyx_v_ebN);
17529  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ebN);
17530  __Pyx_INCREF(__pyx_int_0);
17531  __Pyx_GIVEREF(__pyx_int_0);
17532  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
17533  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 823, __pyx_L1_error)
17534  __Pyx_GOTREF(__pyx_t_15);
17535  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17536  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17537  __Pyx_XDECREF_SET(__pyx_v_eN_global, __pyx_t_15);
17538  __pyx_t_15 = 0;
17539 
17540  /* "ADR.pyx":824
17541  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17542  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17543  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0] # <<<<<<<<<<<<<<
17544  * for i in range(self.mesh.nNodes_element):
17545  * if i != ebN_element:
17546  */
17547  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 824, __pyx_L1_error)
17548  __Pyx_GOTREF(__pyx_t_15);
17549  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 824, __pyx_L1_error)
17550  __Pyx_GOTREF(__pyx_t_2);
17551  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17552  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 824, __pyx_L1_error)
17553  __Pyx_GOTREF(__pyx_t_15);
17554  __Pyx_INCREF(__pyx_v_ebN);
17555  __Pyx_GIVEREF(__pyx_v_ebN);
17556  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_ebN);
17557  __Pyx_INCREF(__pyx_int_0);
17558  __Pyx_GIVEREF(__pyx_int_0);
17559  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_int_0);
17560  __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 824, __pyx_L1_error)
17561  __Pyx_GOTREF(__pyx_t_11);
17562  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17563  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17564  __Pyx_XDECREF_SET(__pyx_v_ebN_element, __pyx_t_11);
17565  __pyx_t_11 = 0;
17566 
17567  /* "ADR.pyx":825
17568  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17569  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17570  * for i in range(self.mesh.nNodes_element): # <<<<<<<<<<<<<<
17571  * if i != ebN_element:
17572  * I = self.mesh.elementNodesArray[eN_global,i]
17573  */
17574  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 825, __pyx_L1_error)
17575  __Pyx_GOTREF(__pyx_t_11);
17576  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 825, __pyx_L1_error)
17577  __Pyx_GOTREF(__pyx_t_15);
17578  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17579  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 825, __pyx_L1_error)
17580  __Pyx_GOTREF(__pyx_t_11);
17581  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17582  if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
17583  __pyx_t_15 = __pyx_t_11; __Pyx_INCREF(__pyx_t_15); __pyx_t_9 = 0;
17584  __pyx_t_10 = NULL;
17585  } else {
17586  __pyx_t_9 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 825, __pyx_L1_error)
17587  __Pyx_GOTREF(__pyx_t_15);
17588  __pyx_t_10 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 825, __pyx_L1_error)
17589  }
17590  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17591  for (;;) {
17592  if (likely(!__pyx_t_10)) {
17593  if (likely(PyList_CheckExact(__pyx_t_15))) {
17594  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_15)) break;
17595  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17596  __pyx_t_11 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 825, __pyx_L1_error)
17597  #else
17598  __pyx_t_11 = PySequence_ITEM(__pyx_t_15, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 825, __pyx_L1_error)
17599  __Pyx_GOTREF(__pyx_t_11);
17600  #endif
17601  } else {
17602  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
17603  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17604  __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 825, __pyx_L1_error)
17605  #else
17606  __pyx_t_11 = PySequence_ITEM(__pyx_t_15, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 825, __pyx_L1_error)
17607  __Pyx_GOTREF(__pyx_t_11);
17608  #endif
17609  }
17610  } else {
17611  __pyx_t_11 = __pyx_t_10(__pyx_t_15);
17612  if (unlikely(!__pyx_t_11)) {
17613  PyObject* exc_type = PyErr_Occurred();
17614  if (exc_type) {
17615  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17616  else __PYX_ERR(1, 825, __pyx_L1_error)
17617  }
17618  break;
17619  }
17620  __Pyx_GOTREF(__pyx_t_11);
17621  }
17622  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_11);
17623  __pyx_t_11 = 0;
17624 
17625  /* "ADR.pyx":826
17626  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17627  * for i in range(self.mesh.nNodes_element):
17628  * if i != ebN_element: # <<<<<<<<<<<<<<
17629  * I = self.mesh.elementNodesArray[eN_global,i]
17630  * self.internalNodes -= set([I])
17631  */
17632  __pyx_t_11 = PyObject_RichCompare(__pyx_v_i, __pyx_v_ebN_element, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 826, __pyx_L1_error)
17633  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 826, __pyx_L1_error)
17634  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17635  if (__pyx_t_3) {
17636 
17637  /* "ADR.pyx":827
17638  * for i in range(self.mesh.nNodes_element):
17639  * if i != ebN_element:
17640  * I = self.mesh.elementNodesArray[eN_global,i] # <<<<<<<<<<<<<<
17641  * self.internalNodes -= set([I])
17642  * self.nNodes_internal = len(self.internalNodes)
17643  */
17644  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 827, __pyx_L1_error)
17645  __Pyx_GOTREF(__pyx_t_11);
17646  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 827, __pyx_L1_error)
17647  __Pyx_GOTREF(__pyx_t_2);
17648  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17649  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 827, __pyx_L1_error)
17650  __Pyx_GOTREF(__pyx_t_11);
17651  __Pyx_INCREF(__pyx_v_eN_global);
17652  __Pyx_GIVEREF(__pyx_v_eN_global);
17653  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_eN_global);
17654  __Pyx_INCREF(__pyx_v_i);
17655  __Pyx_GIVEREF(__pyx_v_i);
17656  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_i);
17657  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 827, __pyx_L1_error)
17658  __Pyx_GOTREF(__pyx_t_1);
17659  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17660  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17661  __Pyx_XDECREF_SET(__pyx_v_I, __pyx_t_1);
17662  __pyx_t_1 = 0;
17663 
17664  /* "ADR.pyx":828
17665  * if i != ebN_element:
17666  * I = self.mesh.elementNodesArray[eN_global,i]
17667  * self.internalNodes -= set([I]) # <<<<<<<<<<<<<<
17668  * self.nNodes_internal = len(self.internalNodes)
17669  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17670  */
17671  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 828, __pyx_L1_error)
17672  __Pyx_GOTREF(__pyx_t_1);
17673  __pyx_t_11 = PySet_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 828, __pyx_L1_error)
17674  __Pyx_GOTREF(__pyx_t_11);
17675  if (PySet_Add(__pyx_t_11, __pyx_v_I) < 0) __PYX_ERR(1, 828, __pyx_L1_error)
17676  __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 828, __pyx_L1_error)
17677  __Pyx_GOTREF(__pyx_t_2);
17678  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17679  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17680  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, __pyx_t_2) < 0) __PYX_ERR(1, 828, __pyx_L1_error)
17681  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17682 
17683  /* "ADR.pyx":826
17684  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17685  * for i in range(self.mesh.nNodes_element):
17686  * if i != ebN_element: # <<<<<<<<<<<<<<
17687  * I = self.mesh.elementNodesArray[eN_global,i]
17688  * self.internalNodes -= set([I])
17689  */
17690  }
17691 
17692  /* "ADR.pyx":825
17693  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17694  * ebN_element = self.mesh.elementBoundaryLocalElementBoundariesArray[ebN,0]
17695  * for i in range(self.mesh.nNodes_element): # <<<<<<<<<<<<<<
17696  * if i != ebN_element:
17697  * I = self.mesh.elementNodesArray[eN_global,i]
17698  */
17699  }
17700  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17701 
17702  /* "ADR.pyx":821
17703  * #identify the internal nodes this is ought to be in mesh
17704  * ##\todo move this to mesh
17705  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
17706  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
17707  * eN_global = self.mesh.elementBoundaryElementsArray[ebN,0]
17708  */
17709  }
17710  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17711 
17712  /* "ADR.pyx":829
17713  * I = self.mesh.elementNodesArray[eN_global,i]
17714  * self.internalNodes -= set([I])
17715  * self.nNodes_internal = len(self.internalNodes) # <<<<<<<<<<<<<<
17716  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17717  * for nI,n in enumerate(self.internalNodes):
17718  */
17719  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 829, __pyx_L1_error)
17720  __Pyx_GOTREF(__pyx_t_6);
17721  __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 829, __pyx_L1_error)
17722  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17723  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 829, __pyx_L1_error)
17724  __Pyx_GOTREF(__pyx_t_6);
17725  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nNodes_internal, __pyx_t_6) < 0) __PYX_ERR(1, 829, __pyx_L1_error)
17726  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17727 
17728  /* "ADR.pyx":830
17729  * self.internalNodes -= set([I])
17730  * self.nNodes_internal = len(self.internalNodes)
17731  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i') # <<<<<<<<<<<<<<
17732  * for nI,n in enumerate(self.internalNodes):
17733  * self.internalNodesArray[nI]=n
17734  */
17735  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 830, __pyx_L1_error)
17736  __Pyx_GOTREF(__pyx_t_15);
17737  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 830, __pyx_L1_error)
17738  __Pyx_GOTREF(__pyx_t_2);
17739  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
17740  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nNodes_internal); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 830, __pyx_L1_error)
17741  __Pyx_GOTREF(__pyx_t_15);
17742  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 830, __pyx_L1_error)
17743  __Pyx_GOTREF(__pyx_t_11);
17744  __Pyx_GIVEREF(__pyx_t_15);
17745  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_15);
17746  __pyx_t_15 = 0;
17747  __pyx_t_15 = NULL;
17748  __pyx_t_14 = 0;
17749  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
17750  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
17751  if (likely(__pyx_t_15)) {
17752  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17753  __Pyx_INCREF(__pyx_t_15);
17754  __Pyx_INCREF(function);
17755  __Pyx_DECREF_SET(__pyx_t_2, function);
17756  __pyx_t_14 = 1;
17757  }
17758  }
17759  #if CYTHON_FAST_PYCALL
17760  if (PyFunction_Check(__pyx_t_2)) {
17761  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_11, __pyx_n_s_i};
17762  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 830, __pyx_L1_error)
17763  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
17764  __Pyx_GOTREF(__pyx_t_6);
17765  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17766  } else
17767  #endif
17768  #if CYTHON_FAST_PYCCALL
17769  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
17770  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_11, __pyx_n_s_i};
17771  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 830, __pyx_L1_error)
17772  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
17773  __Pyx_GOTREF(__pyx_t_6);
17774  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17775  } else
17776  #endif
17777  {
17778  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 830, __pyx_L1_error)
17779  __Pyx_GOTREF(__pyx_t_1);
17780  if (__pyx_t_15) {
17781  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
17782  }
17783  __Pyx_GIVEREF(__pyx_t_11);
17784  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_11);
17785  __Pyx_INCREF(__pyx_n_s_i);
17786  __Pyx_GIVEREF(__pyx_n_s_i);
17787  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_i);
17788  __pyx_t_11 = 0;
17789  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 830, __pyx_L1_error)
17790  __Pyx_GOTREF(__pyx_t_6);
17791  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17792  }
17793  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17794  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodesArray, __pyx_t_6) < 0) __PYX_ERR(1, 830, __pyx_L1_error)
17795  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17796 
17797  /* "ADR.pyx":831
17798  * self.nNodes_internal = len(self.internalNodes)
17799  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17800  * for nI,n in enumerate(self.internalNodes): # <<<<<<<<<<<<<<
17801  * self.internalNodesArray[nI]=n
17802  * #
17803  */
17804  __Pyx_INCREF(__pyx_int_0);
17805  __pyx_t_6 = __pyx_int_0;
17806  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 831, __pyx_L1_error)
17807  __Pyx_GOTREF(__pyx_t_2);
17808  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
17809  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
17810  __pyx_t_5 = NULL;
17811  } else {
17812  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 831, __pyx_L1_error)
17813  __Pyx_GOTREF(__pyx_t_1);
17814  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 831, __pyx_L1_error)
17815  }
17816  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17817  for (;;) {
17818  if (likely(!__pyx_t_5)) {
17819  if (likely(PyList_CheckExact(__pyx_t_1))) {
17820  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
17821  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17822  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
17823  #else
17824  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 831, __pyx_L1_error)
17825  __Pyx_GOTREF(__pyx_t_2);
17826  #endif
17827  } else {
17828  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
17829  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17830  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 831, __pyx_L1_error)
17831  #else
17832  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 831, __pyx_L1_error)
17833  __Pyx_GOTREF(__pyx_t_2);
17834  #endif
17835  }
17836  } else {
17837  __pyx_t_2 = __pyx_t_5(__pyx_t_1);
17838  if (unlikely(!__pyx_t_2)) {
17839  PyObject* exc_type = PyErr_Occurred();
17840  if (exc_type) {
17841  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17842  else __PYX_ERR(1, 831, __pyx_L1_error)
17843  }
17844  break;
17845  }
17846  __Pyx_GOTREF(__pyx_t_2);
17847  }
17848  __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2);
17849  __pyx_t_2 = 0;
17850  __Pyx_INCREF(__pyx_t_6);
17851  __Pyx_XDECREF_SET(__pyx_v_nI, __pyx_t_6);
17852  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 831, __pyx_L1_error)
17853  __Pyx_GOTREF(__pyx_t_2);
17854  __Pyx_DECREF(__pyx_t_6);
17855  __pyx_t_6 = __pyx_t_2;
17856  __pyx_t_2 = 0;
17857 
17858  /* "ADR.pyx":832
17859  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17860  * for nI,n in enumerate(self.internalNodes):
17861  * self.internalNodesArray[nI]=n # <<<<<<<<<<<<<<
17862  * #
17863  * del self.internalNodes
17864  */
17865  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_internalNodesArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 832, __pyx_L1_error)
17866  __Pyx_GOTREF(__pyx_t_2);
17867  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_nI, __pyx_v_n) < 0)) __PYX_ERR(1, 832, __pyx_L1_error)
17868  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17869 
17870  /* "ADR.pyx":831
17871  * self.nNodes_internal = len(self.internalNodes)
17872  * self.internalNodesArray=numpy.zeros((self.nNodes_internal,),'i')
17873  * for nI,n in enumerate(self.internalNodes): # <<<<<<<<<<<<<<
17874  * self.internalNodesArray[nI]=n
17875  * #
17876  */
17877  }
17878  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17879  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17880 
17881  /* "ADR.pyx":834
17882  * self.internalNodesArray[nI]=n
17883  * #
17884  * del self.internalNodes # <<<<<<<<<<<<<<
17885  * self.internalNodes = None
17886  * log("Updating local to global mappings",2)
17887  */
17888  if (__Pyx_PyObject_DelAttrStr(__pyx_v_self, __pyx_n_s_internalNodes) < 0) __PYX_ERR(1, 834, __pyx_L1_error)
17889 
17890  /* "ADR.pyx":835
17891  * #
17892  * del self.internalNodes
17893  * self.internalNodes = None # <<<<<<<<<<<<<<
17894  * log("Updating local to global mappings",2)
17895  * self.updateLocal2Global()
17896  */
17897  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_internalNodes, Py_None) < 0) __PYX_ERR(1, 835, __pyx_L1_error)
17898 
17899  /* "ADR.pyx":836
17900  * del self.internalNodes
17901  * self.internalNodes = None
17902  * log("Updating local to global mappings",2) # <<<<<<<<<<<<<<
17903  * self.updateLocal2Global()
17904  * log("Building time integration object",2)
17905  */
17906  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 836, __pyx_L1_error)
17907  __Pyx_GOTREF(__pyx_t_6);
17908  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 836, __pyx_L1_error)
17909  __Pyx_GOTREF(__pyx_t_1);
17910  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17911  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17912 
17913  /* "ADR.pyx":837
17914  * self.internalNodes = None
17915  * log("Updating local to global mappings",2)
17916  * self.updateLocal2Global() # <<<<<<<<<<<<<<
17917  * log("Building time integration object",2)
17918  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
17919  */
17920  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateLocal2Global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 837, __pyx_L1_error)
17921  __Pyx_GOTREF(__pyx_t_6);
17922  __pyx_t_2 = NULL;
17923  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
17924  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
17925  if (likely(__pyx_t_2)) {
17926  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17927  __Pyx_INCREF(__pyx_t_2);
17928  __Pyx_INCREF(function);
17929  __Pyx_DECREF_SET(__pyx_t_6, function);
17930  }
17931  }
17932  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
17933  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
17934  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 837, __pyx_L1_error)
17935  __Pyx_GOTREF(__pyx_t_1);
17936  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17937  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17938 
17939  /* "ADR.pyx":838
17940  * log("Updating local to global mappings",2)
17941  * self.updateLocal2Global()
17942  * log("Building time integration object",2) # <<<<<<<<<<<<<<
17943  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
17944  * #mwf for interpolating subgrid error for gradients etc
17945  */
17946  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 838, __pyx_L1_error)
17947  __Pyx_GOTREF(__pyx_t_1);
17948  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 838, __pyx_L1_error)
17949  __Pyx_GOTREF(__pyx_t_6);
17950  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17951  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17952 
17953  /* "ADR.pyx":839
17954  * self.updateLocal2Global()
17955  * log("Building time integration object",2)
17956  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
17957  * #mwf for interpolating subgrid error for gradients etc
17958  * if self.stabilization and self.stabilization.usesGradientStabilization:
17959  */
17960  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 839, __pyx_L1_error)
17961  __Pyx_GOTREF(__pyx_t_6);
17962  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_memory); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 839, __pyx_L1_error)
17963  __Pyx_GOTREF(__pyx_t_1);
17964  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 839, __pyx_L1_error)
17965  __Pyx_GOTREF(__pyx_t_2);
17966  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17967  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 839, __pyx_L1_error)
17968  __Pyx_GOTREF(__pyx_t_1);
17969  __Pyx_GIVEREF(__pyx_t_2);
17970  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
17971  __pyx_t_2 = 0;
17972  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 839, __pyx_L1_error)
17973  __Pyx_GOTREF(__pyx_t_2);
17974  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(1, 839, __pyx_L1_error)
17975  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 839, __pyx_L1_error)
17976  __Pyx_GOTREF(__pyx_t_11);
17977  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17978  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17979  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17980  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17981 
17982  /* "ADR.pyx":841
17983  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
17984  * #mwf for interpolating subgrid error for gradients etc
17985  * if self.stabilization and self.stabilization.usesGradientStabilization: # <<<<<<<<<<<<<<
17986  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
17987  * else:
17988  */
17989  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 841, __pyx_L1_error)
17990  __Pyx_GOTREF(__pyx_t_11);
17991  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
17992  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17993  if (__pyx_t_8) {
17994  } else {
17995  __pyx_t_3 = __pyx_t_8;
17996  goto __pyx_L103_bool_binop_done;
17997  }
17998  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 841, __pyx_L1_error)
17999  __Pyx_GOTREF(__pyx_t_11);
18000  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_usesGradientStabilization); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 841, __pyx_L1_error)
18001  __Pyx_GOTREF(__pyx_t_2);
18002  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18003  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 841, __pyx_L1_error)
18004  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18005  __pyx_t_3 = __pyx_t_8;
18006  __pyx_L103_bool_binop_done:;
18007  if (__pyx_t_3) {
18008 
18009  /* "ADR.pyx":842
18010  * #mwf for interpolating subgrid error for gradients etc
18011  * if self.stabilization and self.stabilization.usesGradientStabilization:
18012  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True) # <<<<<<<<<<<<<<
18013  * else:
18014  * self.timeIntegration = TimeIntegrationClass(self)
18015  */
18016  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 842, __pyx_L1_error)
18017  __Pyx_GOTREF(__pyx_t_2);
18018  __Pyx_INCREF(__pyx_v_self);
18019  __Pyx_GIVEREF(__pyx_v_self);
18020  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
18021  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 842, __pyx_L1_error)
18022  __Pyx_GOTREF(__pyx_t_11);
18023  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_integrateInterpolationPoints, Py_True) < 0) __PYX_ERR(1, 842, __pyx_L1_error)
18024  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_TimeIntegrationClass, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 842, __pyx_L1_error)
18025  __Pyx_GOTREF(__pyx_t_1);
18026  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18027  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18028  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration, __pyx_t_1) < 0) __PYX_ERR(1, 842, __pyx_L1_error)
18029  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18030 
18031  /* "ADR.pyx":841
18032  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
18033  * #mwf for interpolating subgrid error for gradients etc
18034  * if self.stabilization and self.stabilization.usesGradientStabilization: # <<<<<<<<<<<<<<
18035  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18036  * else:
18037  */
18038  goto __pyx_L102;
18039  }
18040 
18041  /* "ADR.pyx":844
18042  * self.timeIntegration = TimeIntegrationClass(self,integrateInterpolationPoints=True)
18043  * else:
18044  * self.timeIntegration = TimeIntegrationClass(self) # <<<<<<<<<<<<<<
18045  *
18046  * if options is not None:
18047  */
18048  /*else*/ {
18049  __Pyx_INCREF(__pyx_v_TimeIntegrationClass);
18050  __pyx_t_11 = __pyx_v_TimeIntegrationClass; __pyx_t_2 = NULL;
18051  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
18052  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
18053  if (likely(__pyx_t_2)) {
18054  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
18055  __Pyx_INCREF(__pyx_t_2);
18056  __Pyx_INCREF(function);
18057  __Pyx_DECREF_SET(__pyx_t_11, function);
18058  }
18059  }
18060  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_self);
18061  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18062  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 844, __pyx_L1_error)
18063  __Pyx_GOTREF(__pyx_t_1);
18064  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18065  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration, __pyx_t_1) < 0) __PYX_ERR(1, 844, __pyx_L1_error)
18066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18067  }
18068  __pyx_L102:;
18069 
18070  /* "ADR.pyx":846
18071  * self.timeIntegration = TimeIntegrationClass(self)
18072  *
18073  * if options is not None: # <<<<<<<<<<<<<<
18074  * self.timeIntegration.setFromOptions(options)
18075  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18076  */
18077  __pyx_t_3 = (__pyx_v_options != Py_None);
18078  __pyx_t_8 = (__pyx_t_3 != 0);
18079  if (__pyx_t_8) {
18080 
18081  /* "ADR.pyx":847
18082  *
18083  * if options is not None:
18084  * self.timeIntegration.setFromOptions(options) # <<<<<<<<<<<<<<
18085  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18086  * log("Calculating numerical quadrature formulas",2)
18087  */
18088  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 847, __pyx_L1_error)
18089  __Pyx_GOTREF(__pyx_t_11);
18090  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_setFromOptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 847, __pyx_L1_error)
18091  __Pyx_GOTREF(__pyx_t_2);
18092  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18093  __pyx_t_11 = NULL;
18094  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18095  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
18096  if (likely(__pyx_t_11)) {
18097  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18098  __Pyx_INCREF(__pyx_t_11);
18099  __Pyx_INCREF(function);
18100  __Pyx_DECREF_SET(__pyx_t_2, function);
18101  }
18102  }
18103  __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_options) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_options);
18104  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
18105  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 847, __pyx_L1_error)
18106  __Pyx_GOTREF(__pyx_t_1);
18107  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18108  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18109 
18110  /* "ADR.pyx":846
18111  * self.timeIntegration = TimeIntegrationClass(self)
18112  *
18113  * if options is not None: # <<<<<<<<<<<<<<
18114  * self.timeIntegration.setFromOptions(options)
18115  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18116  */
18117  }
18118 
18119  /* "ADR.pyx":848
18120  * if options is not None:
18121  * self.timeIntegration.setFromOptions(options)
18122  * log(memory("TimeIntegration","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18123  * log("Calculating numerical quadrature formulas",2)
18124  * self.calculateQuadrature()
18125  */
18126  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 848, __pyx_L1_error)
18127  __Pyx_GOTREF(__pyx_t_1);
18128  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_memory); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 848, __pyx_L1_error)
18129  __Pyx_GOTREF(__pyx_t_2);
18130  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 848, __pyx_L1_error)
18131  __Pyx_GOTREF(__pyx_t_11);
18132  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18133  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 848, __pyx_L1_error)
18134  __Pyx_GOTREF(__pyx_t_2);
18135  __Pyx_GIVEREF(__pyx_t_11);
18136  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
18137  __pyx_t_11 = 0;
18138  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 848, __pyx_L1_error)
18139  __Pyx_GOTREF(__pyx_t_11);
18140  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(1, 848, __pyx_L1_error)
18141  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 848, __pyx_L1_error)
18142  __Pyx_GOTREF(__pyx_t_6);
18143  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18144  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18145  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18146  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18147 
18148  /* "ADR.pyx":849
18149  * self.timeIntegration.setFromOptions(options)
18150  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18151  * log("Calculating numerical quadrature formulas",2) # <<<<<<<<<<<<<<
18152  * self.calculateQuadrature()
18153  *
18154  */
18155  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 849, __pyx_L1_error)
18156  __Pyx_GOTREF(__pyx_t_6);
18157  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 849, __pyx_L1_error)
18158  __Pyx_GOTREF(__pyx_t_11);
18159  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18160  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18161 
18162  /* "ADR.pyx":850
18163  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
18164  * log("Calculating numerical quadrature formulas",2)
18165  * self.calculateQuadrature() # <<<<<<<<<<<<<<
18166  *
18167  * comm = Comm.get()
18168  */
18169  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calculateQuadrature); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 850, __pyx_L1_error)
18170  __Pyx_GOTREF(__pyx_t_6);
18171  __pyx_t_2 = NULL;
18172  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
18173  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
18174  if (likely(__pyx_t_2)) {
18175  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
18176  __Pyx_INCREF(__pyx_t_2);
18177  __Pyx_INCREF(function);
18178  __Pyx_DECREF_SET(__pyx_t_6, function);
18179  }
18180  }
18181  __pyx_t_11 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
18182  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18183  if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 850, __pyx_L1_error)
18184  __Pyx_GOTREF(__pyx_t_11);
18185  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18186  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18187 
18188  /* "ADR.pyx":852
18189  * self.calculateQuadrature()
18190  *
18191  * comm = Comm.get() # <<<<<<<<<<<<<<
18192  * self.comm=comm
18193  * if comm.size() > 1:
18194  */
18195  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_Comm, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 852, __pyx_L1_error)
18196  __Pyx_GOTREF(__pyx_t_6);
18197  __pyx_t_2 = NULL;
18198  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
18199  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
18200  if (likely(__pyx_t_2)) {
18201  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
18202  __Pyx_INCREF(__pyx_t_2);
18203  __Pyx_INCREF(function);
18204  __Pyx_DECREF_SET(__pyx_t_6, function);
18205  }
18206  }
18207  __pyx_t_11 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
18208  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18209  if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 852, __pyx_L1_error)
18210  __Pyx_GOTREF(__pyx_t_11);
18211  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18212  __pyx_v_comm = __pyx_t_11;
18213  __pyx_t_11 = 0;
18214 
18215  /* "ADR.pyx":853
18216  *
18217  * comm = Comm.get()
18218  * self.comm=comm # <<<<<<<<<<<<<<
18219  * if comm.size() > 1:
18220  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18221  */
18222  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_comm, __pyx_v_comm) < 0) __PYX_ERR(1, 853, __pyx_L1_error)
18223 
18224  /* "ADR.pyx":854
18225  * comm = Comm.get()
18226  * self.comm=comm
18227  * if comm.size() > 1: # <<<<<<<<<<<<<<
18228  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18229  *
18230  */
18231  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 854, __pyx_L1_error)
18232  __Pyx_GOTREF(__pyx_t_6);
18233  __pyx_t_2 = NULL;
18234  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
18235  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
18236  if (likely(__pyx_t_2)) {
18237  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
18238  __Pyx_INCREF(__pyx_t_2);
18239  __Pyx_INCREF(function);
18240  __Pyx_DECREF_SET(__pyx_t_6, function);
18241  }
18242  }
18243  __pyx_t_11 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
18244  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18245  if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 854, __pyx_L1_error)
18246  __Pyx_GOTREF(__pyx_t_11);
18247  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18248  __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 854, __pyx_L1_error)
18249  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18250  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 854, __pyx_L1_error)
18251  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18252  if (__pyx_t_8) {
18253 
18254  /* "ADR.pyx":855
18255  * self.comm=comm
18256  * if comm.size() > 1:
18257  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs" # <<<<<<<<<<<<<<
18258  *
18259  * self.setupFieldStrides()
18260  */
18261  #ifndef CYTHON_WITHOUT_ASSERTIONS
18262  if (unlikely(!Py_OptimizeFlag)) {
18263  __pyx_t_3 = (__pyx_v_numericalFluxType != Py_None);
18264  __pyx_t_17 = (__pyx_t_3 != 0);
18265  if (__pyx_t_17) {
18266  } else {
18267  __pyx_t_8 = __pyx_t_17;
18268  goto __pyx_L107_bool_binop_done;
18269  }
18270  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_numericalFluxType, __pyx_n_s_useWeakDirichletConditions); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 855, __pyx_L1_error)
18271  __Pyx_GOTREF(__pyx_t_6);
18272  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(1, 855, __pyx_L1_error)
18273  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18274  __pyx_t_8 = __pyx_t_17;
18275  __pyx_L107_bool_binop_done:;
18276  if (unlikely(!__pyx_t_8)) {
18277  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_You_must_use_a_numerical_flux_to);
18278  __PYX_ERR(1, 855, __pyx_L1_error)
18279  }
18280  }
18281  #endif
18282 
18283  /* "ADR.pyx":854
18284  * comm = Comm.get()
18285  * self.comm=comm
18286  * if comm.size() > 1: # <<<<<<<<<<<<<<
18287  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18288  *
18289  */
18290  }
18291 
18292  /* "ADR.pyx":857
18293  * assert numericalFluxType is not None and numericalFluxType.useWeakDirichletConditions,"You must use a numerical flux to apply weak boundary conditions for parallel runs"
18294  *
18295  * self.setupFieldStrides() # <<<<<<<<<<<<<<
18296  *
18297  * log(memory("stride+offset","OneLevelTransport"),level=4)
18298  */
18299  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setupFieldStrides); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 857, __pyx_L1_error)
18300  __Pyx_GOTREF(__pyx_t_11);
18301  __pyx_t_2 = NULL;
18302  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
18303  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
18304  if (likely(__pyx_t_2)) {
18305  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
18306  __Pyx_INCREF(__pyx_t_2);
18307  __Pyx_INCREF(function);
18308  __Pyx_DECREF_SET(__pyx_t_11, function);
18309  }
18310  }
18311  __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
18312  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18313  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 857, __pyx_L1_error)
18314  __Pyx_GOTREF(__pyx_t_6);
18315  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18316  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18317 
18318  /* "ADR.pyx":859
18319  * self.setupFieldStrides()
18320  *
18321  * log(memory("stride+offset","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
18322  * if numericalFluxType is not None:
18323  * if options is None or options.periodicDirichletConditions is None:
18324  */
18325  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 859, __pyx_L1_error)
18326  __Pyx_GOTREF(__pyx_t_6);
18327  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_memory); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 859, __pyx_L1_error)
18328  __Pyx_GOTREF(__pyx_t_11);
18329  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 859, __pyx_L1_error)
18330  __Pyx_GOTREF(__pyx_t_2);
18331  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18332  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 859, __pyx_L1_error)
18333  __Pyx_GOTREF(__pyx_t_11);
18334  __Pyx_GIVEREF(__pyx_t_2);
18335  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
18336  __pyx_t_2 = 0;
18337  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 859, __pyx_L1_error)
18338  __Pyx_GOTREF(__pyx_t_2);
18339  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(1, 859, __pyx_L1_error)
18340  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 859, __pyx_L1_error)
18341  __Pyx_GOTREF(__pyx_t_1);
18342  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18343  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18344  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18345  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18346 
18347  /* "ADR.pyx":860
18348  *
18349  * log(memory("stride+offset","OneLevelTransport"),level=4)
18350  * if numericalFluxType is not None: # <<<<<<<<<<<<<<
18351  * if options is None or options.periodicDirichletConditions is None:
18352  * self.numericalFlux = numericalFluxType(self,
18353  */
18354  __pyx_t_8 = (__pyx_v_numericalFluxType != Py_None);
18355  __pyx_t_17 = (__pyx_t_8 != 0);
18356  if (__pyx_t_17) {
18357 
18358  /* "ADR.pyx":861
18359  * log(memory("stride+offset","OneLevelTransport"),level=4)
18360  * if numericalFluxType is not None:
18361  * if options is None or options.periodicDirichletConditions is None: # <<<<<<<<<<<<<<
18362  * self.numericalFlux = numericalFluxType(self,
18363  * dofBoundaryConditionsSetterDict,
18364  */
18365  __pyx_t_8 = (__pyx_v_options == Py_None);
18366  __pyx_t_3 = (__pyx_t_8 != 0);
18367  if (!__pyx_t_3) {
18368  } else {
18369  __pyx_t_17 = __pyx_t_3;
18370  goto __pyx_L111_bool_binop_done;
18371  }
18372  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_periodicDirichletConditions); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 861, __pyx_L1_error)
18373  __Pyx_GOTREF(__pyx_t_1);
18374  __pyx_t_3 = (__pyx_t_1 == Py_None);
18375  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18376  __pyx_t_8 = (__pyx_t_3 != 0);
18377  __pyx_t_17 = __pyx_t_8;
18378  __pyx_L111_bool_binop_done:;
18379  if (__pyx_t_17) {
18380 
18381  /* "ADR.pyx":865
18382  * dofBoundaryConditionsSetterDict,
18383  * advectiveFluxBoundaryConditionsSetterDict,
18384  * diffusiveFluxBoundaryConditionsSetterDictDict) # <<<<<<<<<<<<<<
18385  * else:
18386  * self.numericalFlux = numericalFluxType(self,
18387  */
18388  __Pyx_INCREF(__pyx_v_numericalFluxType);
18389  __pyx_t_2 = __pyx_v_numericalFluxType; __pyx_t_11 = NULL;
18390  __pyx_t_14 = 0;
18391  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
18392  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
18393  if (likely(__pyx_t_11)) {
18394  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18395  __Pyx_INCREF(__pyx_t_11);
18396  __Pyx_INCREF(function);
18397  __Pyx_DECREF_SET(__pyx_t_2, function);
18398  __pyx_t_14 = 1;
18399  }
18400  }
18401  #if CYTHON_FAST_PYCALL
18402  if (PyFunction_Check(__pyx_t_2)) {
18403  PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict};
18404  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 4+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 862, __pyx_L1_error)
18405  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
18406  __Pyx_GOTREF(__pyx_t_1);
18407  } else
18408  #endif
18409  #if CYTHON_FAST_PYCCALL
18410  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18411  PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict};
18412  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_14, 4+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 862, __pyx_L1_error)
18413  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
18414  __Pyx_GOTREF(__pyx_t_1);
18415  } else
18416  #endif
18417  {
18418  __pyx_t_6 = PyTuple_New(4+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 862, __pyx_L1_error)
18419  __Pyx_GOTREF(__pyx_t_6);
18420  if (__pyx_t_11) {
18421  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
18422  }
18423  __Pyx_INCREF(__pyx_v_self);
18424  __Pyx_GIVEREF(__pyx_v_self);
18425  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_v_self);
18426  __Pyx_INCREF(__pyx_v_dofBoundaryConditionsSetterDict);
18427  __Pyx_GIVEREF(__pyx_v_dofBoundaryConditionsSetterDict);
18428  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_v_dofBoundaryConditionsSetterDict);
18429  __Pyx_INCREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18430  __Pyx_GIVEREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18431  PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_14, __pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18432  __Pyx_INCREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18433  __Pyx_GIVEREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18434  PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_14, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18435  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 862, __pyx_L1_error)
18436  __Pyx_GOTREF(__pyx_t_1);
18437  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18438  }
18439  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18440 
18441  /* "ADR.pyx":862
18442  * if numericalFluxType is not None:
18443  * if options is None or options.periodicDirichletConditions is None:
18444  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18445  * dofBoundaryConditionsSetterDict,
18446  * advectiveFluxBoundaryConditionsSetterDict,
18447  */
18448  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, __pyx_t_1) < 0) __PYX_ERR(1, 862, __pyx_L1_error)
18449  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18450 
18451  /* "ADR.pyx":861
18452  * log(memory("stride+offset","OneLevelTransport"),level=4)
18453  * if numericalFluxType is not None:
18454  * if options is None or options.periodicDirichletConditions is None: # <<<<<<<<<<<<<<
18455  * self.numericalFlux = numericalFluxType(self,
18456  * dofBoundaryConditionsSetterDict,
18457  */
18458  goto __pyx_L110;
18459  }
18460 
18461  /* "ADR.pyx":867
18462  * diffusiveFluxBoundaryConditionsSetterDictDict)
18463  * else:
18464  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18465  * dofBoundaryConditionsSetterDict,
18466  * advectiveFluxBoundaryConditionsSetterDict,
18467  */
18468  /*else*/ {
18469 
18470  /* "ADR.pyx":871
18471  * advectiveFluxBoundaryConditionsSetterDict,
18472  * diffusiveFluxBoundaryConditionsSetterDictDict,
18473  * options.periodicDirichletConditions) # <<<<<<<<<<<<<<
18474  * else:
18475  * self.numericalFlux = None
18476  */
18477  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_periodicDirichletConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 871, __pyx_L1_error)
18478  __Pyx_GOTREF(__pyx_t_2);
18479  __Pyx_INCREF(__pyx_v_numericalFluxType);
18480  __pyx_t_6 = __pyx_v_numericalFluxType; __pyx_t_11 = NULL;
18481  __pyx_t_14 = 0;
18482  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
18483  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
18484  if (likely(__pyx_t_11)) {
18485  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
18486  __Pyx_INCREF(__pyx_t_11);
18487  __Pyx_INCREF(function);
18488  __Pyx_DECREF_SET(__pyx_t_6, function);
18489  __pyx_t_14 = 1;
18490  }
18491  }
18492  #if CYTHON_FAST_PYCALL
18493  if (PyFunction_Check(__pyx_t_6)) {
18494  PyObject *__pyx_temp[6] = {__pyx_t_11, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_t_2};
18495  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 5+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 867, __pyx_L1_error)
18496  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
18497  __Pyx_GOTREF(__pyx_t_1);
18498  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18499  } else
18500  #endif
18501  #if CYTHON_FAST_PYCCALL
18502  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
18503  PyObject *__pyx_temp[6] = {__pyx_t_11, __pyx_v_self, __pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_advectiveFluxBoundaryConditionsSetterDict, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict, __pyx_t_2};
18504  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 5+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 867, __pyx_L1_error)
18505  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
18506  __Pyx_GOTREF(__pyx_t_1);
18507  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18508  } else
18509  #endif
18510  {
18511  __pyx_t_15 = PyTuple_New(5+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 867, __pyx_L1_error)
18512  __Pyx_GOTREF(__pyx_t_15);
18513  if (__pyx_t_11) {
18514  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_11); __pyx_t_11 = NULL;
18515  }
18516  __Pyx_INCREF(__pyx_v_self);
18517  __Pyx_GIVEREF(__pyx_v_self);
18518  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_v_self);
18519  __Pyx_INCREF(__pyx_v_dofBoundaryConditionsSetterDict);
18520  __Pyx_GIVEREF(__pyx_v_dofBoundaryConditionsSetterDict);
18521  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_v_dofBoundaryConditionsSetterDict);
18522  __Pyx_INCREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18523  __Pyx_GIVEREF(__pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18524  PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_14, __pyx_v_advectiveFluxBoundaryConditionsSetterDict);
18525  __Pyx_INCREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18526  __Pyx_GIVEREF(__pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18527  PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_14, __pyx_v_diffusiveFluxBoundaryConditionsSetterDictDict);
18528  __Pyx_GIVEREF(__pyx_t_2);
18529  PyTuple_SET_ITEM(__pyx_t_15, 4+__pyx_t_14, __pyx_t_2);
18530  __pyx_t_2 = 0;
18531  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 867, __pyx_L1_error)
18532  __Pyx_GOTREF(__pyx_t_1);
18533  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18534  }
18535  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18536 
18537  /* "ADR.pyx":867
18538  * diffusiveFluxBoundaryConditionsSetterDictDict)
18539  * else:
18540  * self.numericalFlux = numericalFluxType(self, # <<<<<<<<<<<<<<
18541  * dofBoundaryConditionsSetterDict,
18542  * advectiveFluxBoundaryConditionsSetterDict,
18543  */
18544  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, __pyx_t_1) < 0) __PYX_ERR(1, 867, __pyx_L1_error)
18545  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18546  }
18547  __pyx_L110:;
18548 
18549  /* "ADR.pyx":860
18550  *
18551  * log(memory("stride+offset","OneLevelTransport"),level=4)
18552  * if numericalFluxType is not None: # <<<<<<<<<<<<<<
18553  * if options is None or options.periodicDirichletConditions is None:
18554  * self.numericalFlux = numericalFluxType(self,
18555  */
18556  goto __pyx_L109;
18557  }
18558 
18559  /* "ADR.pyx":873
18560  * options.periodicDirichletConditions)
18561  * else:
18562  * self.numericalFlux = None # <<<<<<<<<<<<<<
18563  * #set penalty terms
18564  * #cek todo move into numerical flux initialization
18565  */
18566  /*else*/ {
18567  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux, Py_None) < 0) __PYX_ERR(1, 873, __pyx_L1_error)
18568  }
18569  __pyx_L109:;
18570 
18571  /* "ADR.pyx":876
18572  * #set penalty terms
18573  * #cek todo move into numerical flux initialization
18574  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
18575  * for ebN in range(self.mesh.nElementBoundaries_global):
18576  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18577  */
18578  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 876, __pyx_L1_error)
18579  __Pyx_GOTREF(__pyx_t_6);
18580  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_has_key); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 876, __pyx_L1_error)
18581  __Pyx_GOTREF(__pyx_t_15);
18582  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18583  __pyx_t_6 = NULL;
18584  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
18585  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
18586  if (likely(__pyx_t_6)) {
18587  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
18588  __Pyx_INCREF(__pyx_t_6);
18589  __Pyx_INCREF(function);
18590  __Pyx_DECREF_SET(__pyx_t_15, function);
18591  }
18592  }
18593  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_6, __pyx_n_s_penalty) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_n_s_penalty);
18594  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18595  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 876, __pyx_L1_error)
18596  __Pyx_GOTREF(__pyx_t_1);
18597  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18598  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(1, 876, __pyx_L1_error)
18599  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18600  if (__pyx_t_17) {
18601 
18602  /* "ADR.pyx":877
18603  * #cek todo move into numerical flux initialization
18604  * if self.ebq_global.has_key('penalty'):
18605  * for ebN in range(self.mesh.nElementBoundaries_global): # <<<<<<<<<<<<<<
18606  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18607  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
18608  */
18609  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 877, __pyx_L1_error)
18610  __Pyx_GOTREF(__pyx_t_1);
18611  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 877, __pyx_L1_error)
18612  __Pyx_GOTREF(__pyx_t_15);
18613  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18614  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 877, __pyx_L1_error)
18615  __Pyx_GOTREF(__pyx_t_1);
18616  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18617  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
18618  __pyx_t_15 = __pyx_t_1; __Pyx_INCREF(__pyx_t_15); __pyx_t_4 = 0;
18619  __pyx_t_5 = NULL;
18620  } else {
18621  __pyx_t_4 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 877, __pyx_L1_error)
18622  __Pyx_GOTREF(__pyx_t_15);
18623  __pyx_t_5 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 877, __pyx_L1_error)
18624  }
18625  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18626  for (;;) {
18627  if (likely(!__pyx_t_5)) {
18628  if (likely(PyList_CheckExact(__pyx_t_15))) {
18629  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_15)) break;
18630  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18631  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 877, __pyx_L1_error)
18632  #else
18633  __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 877, __pyx_L1_error)
18634  __Pyx_GOTREF(__pyx_t_1);
18635  #endif
18636  } else {
18637  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
18638  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18639  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 877, __pyx_L1_error)
18640  #else
18641  __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 877, __pyx_L1_error)
18642  __Pyx_GOTREF(__pyx_t_1);
18643  #endif
18644  }
18645  } else {
18646  __pyx_t_1 = __pyx_t_5(__pyx_t_15);
18647  if (unlikely(!__pyx_t_1)) {
18648  PyObject* exc_type = PyErr_Occurred();
18649  if (exc_type) {
18650  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18651  else __PYX_ERR(1, 877, __pyx_L1_error)
18652  }
18653  break;
18654  }
18655  __Pyx_GOTREF(__pyx_t_1);
18656  }
18657  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_1);
18658  __pyx_t_1 = 0;
18659 
18660  /* "ADR.pyx":878
18661  * if self.ebq_global.has_key('penalty'):
18662  * for ebN in range(self.mesh.nElementBoundaries_global):
18663  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
18664  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
18665  * #penalty term
18666  */
18667  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 878, __pyx_L1_error)
18668  __Pyx_GOTREF(__pyx_t_1);
18669  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 878, __pyx_L1_error)
18670  __Pyx_GOTREF(__pyx_t_6);
18671  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18672  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
18673  __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
18674  __pyx_t_10 = NULL;
18675  } else {
18676  __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 878, __pyx_L1_error)
18677  __Pyx_GOTREF(__pyx_t_1);
18678  __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 878, __pyx_L1_error)
18679  }
18680  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18681  for (;;) {
18682  if (likely(!__pyx_t_10)) {
18683  if (likely(PyList_CheckExact(__pyx_t_1))) {
18684  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
18685  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18686  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 878, __pyx_L1_error)
18687  #else
18688  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 878, __pyx_L1_error)
18689  __Pyx_GOTREF(__pyx_t_6);
18690  #endif
18691  } else {
18692  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
18693  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18694  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 878, __pyx_L1_error)
18695  #else
18696  __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 878, __pyx_L1_error)
18697  __Pyx_GOTREF(__pyx_t_6);
18698  #endif
18699  }
18700  } else {
18701  __pyx_t_6 = __pyx_t_10(__pyx_t_1);
18702  if (unlikely(!__pyx_t_6)) {
18703  PyObject* exc_type = PyErr_Occurred();
18704  if (exc_type) {
18705  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18706  else __PYX_ERR(1, 878, __pyx_L1_error)
18707  }
18708  break;
18709  }
18710  __Pyx_GOTREF(__pyx_t_6);
18711  }
18712  __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
18713  __pyx_t_6 = 0;
18714 
18715  /* "ADR.pyx":879
18716  * for ebN in range(self.mesh.nElementBoundaries_global):
18717  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18718  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power) # <<<<<<<<<<<<<<
18719  * #penalty term
18720  * #cek move to Numerical flux initialization
18721  */
18722  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 879, __pyx_L1_error)
18723  __Pyx_GOTREF(__pyx_t_6);
18724  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_penalty_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 879, __pyx_L1_error)
18725  __Pyx_GOTREF(__pyx_t_2);
18726  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18727  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 879, __pyx_L1_error)
18728  __Pyx_GOTREF(__pyx_t_6);
18729  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 879, __pyx_L1_error)
18730  __Pyx_GOTREF(__pyx_t_11);
18731  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18732  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_v_ebN); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 879, __pyx_L1_error)
18733  __Pyx_GOTREF(__pyx_t_6);
18734  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18735  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 879, __pyx_L1_error)
18736  __Pyx_GOTREF(__pyx_t_11);
18737  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_penalty_power); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 879, __pyx_L1_error)
18738  __Pyx_GOTREF(__pyx_t_7);
18739  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18740  __pyx_t_11 = PyNumber_Power(__pyx_t_6, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 879, __pyx_L1_error)
18741  __Pyx_GOTREF(__pyx_t_11);
18742  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18743  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18744  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 879, __pyx_L1_error)
18745  __Pyx_GOTREF(__pyx_t_7);
18746  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18747  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18748  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebq_global); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 879, __pyx_L1_error)
18749  __Pyx_GOTREF(__pyx_t_11);
18750  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_s_penalty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 879, __pyx_L1_error)
18751  __Pyx_GOTREF(__pyx_t_2);
18752  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18753  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 879, __pyx_L1_error)
18754  __Pyx_GOTREF(__pyx_t_11);
18755  __Pyx_INCREF(__pyx_v_ebN);
18756  __Pyx_GIVEREF(__pyx_v_ebN);
18757  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_ebN);
18758  __Pyx_INCREF(__pyx_v_k);
18759  __Pyx_GIVEREF(__pyx_v_k);
18760  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_k);
18761  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_11, __pyx_t_7) < 0)) __PYX_ERR(1, 879, __pyx_L1_error)
18762  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18763  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18764  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18765 
18766  /* "ADR.pyx":878
18767  * if self.ebq_global.has_key('penalty'):
18768  * for ebN in range(self.mesh.nElementBoundaries_global):
18769  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
18770  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
18771  * #penalty term
18772  */
18773  }
18774  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18775 
18776  /* "ADR.pyx":877
18777  * #cek todo move into numerical flux initialization
18778  * if self.ebq_global.has_key('penalty'):
18779  * for ebN in range(self.mesh.nElementBoundaries_global): # <<<<<<<<<<<<<<
18780  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18781  * self.ebq_global['penalty'][ebN,k] = self.numericalFlux.penalty_constant/(self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)
18782  */
18783  }
18784  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18785 
18786  /* "ADR.pyx":876
18787  * #set penalty terms
18788  * #cek todo move into numerical flux initialization
18789  * if self.ebq_global.has_key('penalty'): # <<<<<<<<<<<<<<
18790  * for ebN in range(self.mesh.nElementBoundaries_global):
18791  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18792  */
18793  }
18794 
18795  /* "ADR.pyx":882
18796  * #penalty term
18797  * #cek move to Numerical flux initialization
18798  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
18799  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
18800  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
18801  */
18802  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 882, __pyx_L1_error)
18803  __Pyx_GOTREF(__pyx_t_1);
18804  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_has_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 882, __pyx_L1_error)
18805  __Pyx_GOTREF(__pyx_t_7);
18806  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18807  __pyx_t_1 = NULL;
18808  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
18809  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
18810  if (likely(__pyx_t_1)) {
18811  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18812  __Pyx_INCREF(__pyx_t_1);
18813  __Pyx_INCREF(function);
18814  __Pyx_DECREF_SET(__pyx_t_7, function);
18815  }
18816  }
18817  __pyx_t_15 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, __pyx_n_s_penalty) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_s_penalty);
18818  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
18819  if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 882, __pyx_L1_error)
18820  __Pyx_GOTREF(__pyx_t_15);
18821  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18822  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(1, 882, __pyx_L1_error)
18823  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18824  if (__pyx_t_17) {
18825 
18826  /* "ADR.pyx":883
18827  * #cek move to Numerical flux initialization
18828  * if self.ebqe.has_key('penalty'):
18829  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
18830  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
18831  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18832  */
18833  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 883, __pyx_L1_error)
18834  __Pyx_GOTREF(__pyx_t_15);
18835  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 883, __pyx_L1_error)
18836  __Pyx_GOTREF(__pyx_t_7);
18837  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18838  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 883, __pyx_L1_error)
18839  __Pyx_GOTREF(__pyx_t_15);
18840  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18841  if (likely(PyList_CheckExact(__pyx_t_15)) || PyTuple_CheckExact(__pyx_t_15)) {
18842  __pyx_t_7 = __pyx_t_15; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
18843  __pyx_t_5 = NULL;
18844  } else {
18845  __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 883, __pyx_L1_error)
18846  __Pyx_GOTREF(__pyx_t_7);
18847  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 883, __pyx_L1_error)
18848  }
18849  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18850  for (;;) {
18851  if (likely(!__pyx_t_5)) {
18852  if (likely(PyList_CheckExact(__pyx_t_7))) {
18853  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
18854  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18855  __pyx_t_15 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 883, __pyx_L1_error)
18856  #else
18857  __pyx_t_15 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 883, __pyx_L1_error)
18858  __Pyx_GOTREF(__pyx_t_15);
18859  #endif
18860  } else {
18861  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
18862  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18863  __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_15); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 883, __pyx_L1_error)
18864  #else
18865  __pyx_t_15 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 883, __pyx_L1_error)
18866  __Pyx_GOTREF(__pyx_t_15);
18867  #endif
18868  }
18869  } else {
18870  __pyx_t_15 = __pyx_t_5(__pyx_t_7);
18871  if (unlikely(!__pyx_t_15)) {
18872  PyObject* exc_type = PyErr_Occurred();
18873  if (exc_type) {
18874  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18875  else __PYX_ERR(1, 883, __pyx_L1_error)
18876  }
18877  break;
18878  }
18879  __Pyx_GOTREF(__pyx_t_15);
18880  }
18881  __Pyx_XDECREF_SET(__pyx_v_ebNE, __pyx_t_15);
18882  __pyx_t_15 = 0;
18883 
18884  /* "ADR.pyx":884
18885  * if self.ebqe.has_key('penalty'):
18886  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
18887  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE] # <<<<<<<<<<<<<<
18888  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18889  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
18890  */
18891  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 884, __pyx_L1_error)
18892  __Pyx_GOTREF(__pyx_t_15);
18893  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 884, __pyx_L1_error)
18894  __Pyx_GOTREF(__pyx_t_1);
18895  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18896  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ebNE); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 884, __pyx_L1_error)
18897  __Pyx_GOTREF(__pyx_t_15);
18898  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18899  __Pyx_XDECREF_SET(__pyx_v_ebN, __pyx_t_15);
18900  __pyx_t_15 = 0;
18901 
18902  /* "ADR.pyx":885
18903  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
18904  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
18905  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
18906  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
18907  * log(memory("numericalFlux","OneLevelTransport"),level=4)
18908  */
18909  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 885, __pyx_L1_error)
18910  __Pyx_GOTREF(__pyx_t_15);
18911  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 885, __pyx_L1_error)
18912  __Pyx_GOTREF(__pyx_t_1);
18913  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
18914  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
18915  __pyx_t_15 = __pyx_t_1; __Pyx_INCREF(__pyx_t_15); __pyx_t_9 = 0;
18916  __pyx_t_10 = NULL;
18917  } else {
18918  __pyx_t_9 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 885, __pyx_L1_error)
18919  __Pyx_GOTREF(__pyx_t_15);
18920  __pyx_t_10 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 885, __pyx_L1_error)
18921  }
18922  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18923  for (;;) {
18924  if (likely(!__pyx_t_10)) {
18925  if (likely(PyList_CheckExact(__pyx_t_15))) {
18926  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_15)) break;
18927  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18928  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 885, __pyx_L1_error)
18929  #else
18930  __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 885, __pyx_L1_error)
18931  __Pyx_GOTREF(__pyx_t_1);
18932  #endif
18933  } else {
18934  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
18935  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18936  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 885, __pyx_L1_error)
18937  #else
18938  __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 885, __pyx_L1_error)
18939  __Pyx_GOTREF(__pyx_t_1);
18940  #endif
18941  }
18942  } else {
18943  __pyx_t_1 = __pyx_t_10(__pyx_t_15);
18944  if (unlikely(!__pyx_t_1)) {
18945  PyObject* exc_type = PyErr_Occurred();
18946  if (exc_type) {
18947  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18948  else __PYX_ERR(1, 885, __pyx_L1_error)
18949  }
18950  break;
18951  }
18952  __Pyx_GOTREF(__pyx_t_1);
18953  }
18954  __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1);
18955  __pyx_t_1 = 0;
18956 
18957  /* "ADR.pyx":886
18958  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
18959  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
18960  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power # <<<<<<<<<<<<<<
18961  * log(memory("numericalFlux","OneLevelTransport"),level=4)
18962  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
18963  */
18964  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 886, __pyx_L1_error)
18965  __Pyx_GOTREF(__pyx_t_1);
18966  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_penalty_constant); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 886, __pyx_L1_error)
18967  __Pyx_GOTREF(__pyx_t_11);
18968  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18969  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 886, __pyx_L1_error)
18970  __Pyx_GOTREF(__pyx_t_1);
18971  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 886, __pyx_L1_error)
18972  __Pyx_GOTREF(__pyx_t_2);
18973  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18974  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ebN); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 886, __pyx_L1_error)
18975  __Pyx_GOTREF(__pyx_t_1);
18976  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18977  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 886, __pyx_L1_error)
18978  __Pyx_GOTREF(__pyx_t_2);
18979  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_penalty_power); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 886, __pyx_L1_error)
18980  __Pyx_GOTREF(__pyx_t_6);
18981  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18982  __pyx_t_2 = PyNumber_Power(__pyx_t_1, __pyx_t_6, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 886, __pyx_L1_error)
18983  __Pyx_GOTREF(__pyx_t_2);
18984  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18985  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18986  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 886, __pyx_L1_error)
18987  __Pyx_GOTREF(__pyx_t_6);
18988  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18989  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18990  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 886, __pyx_L1_error)
18991  __Pyx_GOTREF(__pyx_t_2);
18992  __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_penalty); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 886, __pyx_L1_error)
18993  __Pyx_GOTREF(__pyx_t_11);
18994  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18995  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 886, __pyx_L1_error)
18996  __Pyx_GOTREF(__pyx_t_2);
18997  __Pyx_INCREF(__pyx_v_ebNE);
18998  __Pyx_GIVEREF(__pyx_v_ebNE);
18999  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ebNE);
19000  __Pyx_INCREF(__pyx_v_k);
19001  __Pyx_GIVEREF(__pyx_v_k);
19002  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_k);
19003  if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(1, 886, __pyx_L1_error)
19004  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19005  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19006  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19007 
19008  /* "ADR.pyx":885
19009  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19010  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19011  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): # <<<<<<<<<<<<<<
19012  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19013  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19014  */
19015  }
19016  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19017 
19018  /* "ADR.pyx":883
19019  * #cek move to Numerical flux initialization
19020  * if self.ebqe.has_key('penalty'):
19021  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global): # <<<<<<<<<<<<<<
19022  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19023  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19024  */
19025  }
19026  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19027 
19028  /* "ADR.pyx":882
19029  * #penalty term
19030  * #cek move to Numerical flux initialization
19031  * if self.ebqe.has_key('penalty'): # <<<<<<<<<<<<<<
19032  * for ebNE in range(self.mesh.nExteriorElementBoundaries_global):
19033  * ebN = self.mesh.exteriorElementBoundariesArray[ebNE]
19034  */
19035  }
19036 
19037  /* "ADR.pyx":887
19038  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
19039  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19040  * log(memory("numericalFlux","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
19041  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19042  * #use post processing tools to get conservative fluxes, None by default
19043  */
19044  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 887, __pyx_L1_error)
19045  __Pyx_GOTREF(__pyx_t_7);
19046  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_memory); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 887, __pyx_L1_error)
19047  __Pyx_GOTREF(__pyx_t_15);
19048  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 887, __pyx_L1_error)
19049  __Pyx_GOTREF(__pyx_t_6);
19050  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19051  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 887, __pyx_L1_error)
19052  __Pyx_GOTREF(__pyx_t_15);
19053  __Pyx_GIVEREF(__pyx_t_6);
19054  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
19055  __pyx_t_6 = 0;
19056  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 887, __pyx_L1_error)
19057  __Pyx_GOTREF(__pyx_t_6);
19058  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(1, 887, __pyx_L1_error)
19059  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 887, __pyx_L1_error)
19060  __Pyx_GOTREF(__pyx_t_2);
19061  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19062  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19063  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19064  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19065 
19066  /* "ADR.pyx":888
19067  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
19068  * log(memory("numericalFlux","OneLevelTransport"),level=4)
19069  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray # <<<<<<<<<<<<<<
19070  * #use post processing tools to get conservative fluxes, None by default
19071  * from proteus import PostProcessingTools
19072  */
19073  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 888, __pyx_L1_error)
19074  __Pyx_GOTREF(__pyx_t_2);
19075  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementInnerDiametersArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 888, __pyx_L1_error)
19076  __Pyx_GOTREF(__pyx_t_6);
19077  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19078  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementEffectiveDiametersArray, __pyx_t_6) < 0) __PYX_ERR(1, 888, __pyx_L1_error)
19079  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19080 
19081  /* "ADR.pyx":890
19082  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
19083  * #use post processing tools to get conservative fluxes, None by default
19084  * from proteus import PostProcessingTools # <<<<<<<<<<<<<<
19085  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
19086  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19087  */
19088  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 890, __pyx_L1_error)
19089  __Pyx_GOTREF(__pyx_t_6);
19090  __Pyx_INCREF(__pyx_n_s_PostProcessingTools);
19091  __Pyx_GIVEREF(__pyx_n_s_PostProcessingTools);
19092  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_PostProcessingTools);
19093  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 890, __pyx_L1_error)
19094  __Pyx_GOTREF(__pyx_t_2);
19095  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19096  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PostProcessingTools); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 890, __pyx_L1_error)
19097  __Pyx_GOTREF(__pyx_t_6);
19098  __Pyx_INCREF(__pyx_t_6);
19099  __pyx_v_PostProcessingTools = __pyx_t_6;
19100  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19101  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19102 
19103  /* "ADR.pyx":891
19104  * #use post processing tools to get conservative fluxes, None by default
19105  * from proteus import PostProcessingTools
19106  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self) # <<<<<<<<<<<<<<
19107  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19108  * #helper for writing out data storage
19109  */
19110  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_PostProcessingTools, __pyx_n_s_VelocityPostProcessingChooser); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 891, __pyx_L1_error)
19111  __Pyx_GOTREF(__pyx_t_6);
19112  __pyx_t_15 = NULL;
19113  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
19114  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_6);
19115  if (likely(__pyx_t_15)) {
19116  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
19117  __Pyx_INCREF(__pyx_t_15);
19118  __Pyx_INCREF(function);
19119  __Pyx_DECREF_SET(__pyx_t_6, function);
19120  }
19121  }
19122  __pyx_t_2 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_15, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self);
19123  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
19124  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 891, __pyx_L1_error)
19125  __Pyx_GOTREF(__pyx_t_2);
19126  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19127  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_velocityPostProcessor, __pyx_t_2) < 0) __PYX_ERR(1, 891, __pyx_L1_error)
19128  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19129 
19130  /* "ADR.pyx":892
19131  * from proteus import PostProcessingTools
19132  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
19133  * log(memory("velocity postprocessor","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
19134  * #helper for writing out data storage
19135  * from proteus import Archiver
19136  */
19137  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 892, __pyx_L1_error)
19138  __Pyx_GOTREF(__pyx_t_2);
19139  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_memory); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 892, __pyx_L1_error)
19140  __Pyx_GOTREF(__pyx_t_6);
19141  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 892, __pyx_L1_error)
19142  __Pyx_GOTREF(__pyx_t_15);
19143  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19144  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 892, __pyx_L1_error)
19145  __Pyx_GOTREF(__pyx_t_6);
19146  __Pyx_GIVEREF(__pyx_t_15);
19147  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
19148  __pyx_t_15 = 0;
19149  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 892, __pyx_L1_error)
19150  __Pyx_GOTREF(__pyx_t_15);
19151  if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_level, __pyx_int_4) < 0) __PYX_ERR(1, 892, __pyx_L1_error)
19152  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 892, __pyx_L1_error)
19153  __Pyx_GOTREF(__pyx_t_7);
19154  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19155  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19156  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19157  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19158 
19159  /* "ADR.pyx":894
19160  * log(memory("velocity postprocessor","OneLevelTransport"),level=4)
19161  * #helper for writing out data storage
19162  * from proteus import Archiver # <<<<<<<<<<<<<<
19163  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19164  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19165  */
19166  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 894, __pyx_L1_error)
19167  __Pyx_GOTREF(__pyx_t_7);
19168  __Pyx_INCREF(__pyx_n_s_Archiver);
19169  __Pyx_GIVEREF(__pyx_n_s_Archiver);
19170  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_Archiver);
19171  __pyx_t_15 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_7, -1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 894, __pyx_L1_error)
19172  __Pyx_GOTREF(__pyx_t_15);
19173  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19174  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_15, __pyx_n_s_Archiver); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 894, __pyx_L1_error)
19175  __Pyx_GOTREF(__pyx_t_7);
19176  __Pyx_INCREF(__pyx_t_7);
19177  __pyx_v_Archiver = __pyx_t_7;
19178  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19179  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19180 
19181  /* "ADR.pyx":895
19182  * #helper for writing out data storage
19183  * from proteus import Archiver
19184  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19185  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19186  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19187  */
19188  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 895, __pyx_L1_error)
19189  __Pyx_GOTREF(__pyx_t_7);
19190  __pyx_t_6 = NULL;
19191  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19192  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
19193  if (likely(__pyx_t_6)) {
19194  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19195  __Pyx_INCREF(__pyx_t_6);
19196  __Pyx_INCREF(function);
19197  __Pyx_DECREF_SET(__pyx_t_7, function);
19198  }
19199  }
19200  __pyx_t_15 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
19201  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19202  if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 895, __pyx_L1_error)
19203  __Pyx_GOTREF(__pyx_t_15);
19204  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19205  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureDictionaryWrite, __pyx_t_15) < 0) __PYX_ERR(1, 895, __pyx_L1_error)
19206  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19207 
19208  /* "ADR.pyx":896
19209  * from proteus import Archiver
19210  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19211  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19212  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19213  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19214  */
19215  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 896, __pyx_L1_error)
19216  __Pyx_GOTREF(__pyx_t_7);
19217  __pyx_t_6 = NULL;
19218  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19219  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
19220  if (likely(__pyx_t_6)) {
19221  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19222  __Pyx_INCREF(__pyx_t_6);
19223  __Pyx_INCREF(function);
19224  __Pyx_DECREF_SET(__pyx_t_7, function);
19225  }
19226  }
19227  __pyx_t_15 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
19228  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19229  if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 896, __pyx_L1_error)
19230  __Pyx_GOTREF(__pyx_t_15);
19231  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19232  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureDiction, __pyx_t_15) < 0) __PYX_ERR(1, 896, __pyx_L1_error)
19233  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19234 
19235  /* "ADR.pyx":897
19236  * self.elementQuadratureDictionaryWriter = Archiver.XdmfWriter()
19237  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19238  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter() # <<<<<<<<<<<<<<
19239  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19240  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19241  */
19242  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_Archiver, __pyx_n_s_XdmfWriter); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 897, __pyx_L1_error)
19243  __Pyx_GOTREF(__pyx_t_7);
19244  __pyx_t_6 = NULL;
19245  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19246  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
19247  if (likely(__pyx_t_6)) {
19248  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19249  __Pyx_INCREF(__pyx_t_6);
19250  __Pyx_INCREF(function);
19251  __Pyx_DECREF_SET(__pyx_t_7, function);
19252  }
19253  }
19254  __pyx_t_15 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
19255  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19256  if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 897, __pyx_L1_error)
19257  __Pyx_GOTREF(__pyx_t_15);
19258  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19259  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_exteriorElementBoundaryQuadratur, __pyx_t_15) < 0) __PYX_ERR(1, 897, __pyx_L1_error)
19260  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19261 
19262  /* "ADR.pyx":898
19263  * self.elementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19264  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19265  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems(): # <<<<<<<<<<<<<<
19266  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19267  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19268  */
19269  __pyx_t_4 = 0;
19270  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditionsObjectsDic); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 898, __pyx_L1_error)
19271  __Pyx_GOTREF(__pyx_t_7);
19272  if (unlikely(__pyx_t_7 == Py_None)) {
19273  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
19274  __PYX_ERR(1, 898, __pyx_L1_error)
19275  }
19276  __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_n_s_iteritems, (&__pyx_t_9), (&__pyx_t_14)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 898, __pyx_L1_error)
19277  __Pyx_GOTREF(__pyx_t_6);
19278  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19279  __Pyx_XDECREF(__pyx_t_15);
19280  __pyx_t_15 = __pyx_t_6;
19281  __pyx_t_6 = 0;
19282  while (1) {
19283  __pyx_t_18 = __Pyx_dict_iter_next(__pyx_t_15, __pyx_t_9, &__pyx_t_4, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_14);
19284  if (unlikely(__pyx_t_18 == 0)) break;
19285  if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(1, 898, __pyx_L1_error)
19286  __Pyx_GOTREF(__pyx_t_6);
19287  __Pyx_GOTREF(__pyx_t_7);
19288  __Pyx_XDECREF_SET(__pyx_v_ci, __pyx_t_6);
19289  __pyx_t_6 = 0;
19290  __Pyx_XDECREF_SET(__pyx_v_fbcObject, __pyx_t_7);
19291  __pyx_t_7 = 0;
19292 
19293  /* "ADR.pyx":899
19294  * self.exteriorElementBoundaryQuadratureDictionaryWriter = Archiver.XdmfWriter()
19295  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19296  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i') # <<<<<<<<<<<<<<
19297  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19298  * if self.coefficients.advection.has_key(ci):
19299  */
19300  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 899, __pyx_L1_error)
19301  __Pyx_GOTREF(__pyx_t_6);
19302  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 899, __pyx_L1_error)
19303  __Pyx_GOTREF(__pyx_t_2);
19304  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19305  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 899, __pyx_L1_error)
19306  __Pyx_GOTREF(__pyx_t_6);
19307  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 899, __pyx_L1_error)
19308  __Pyx_GOTREF(__pyx_t_11);
19309  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc);
19310  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc);
19311  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_advectiveFlux_bc);
19312  __Pyx_INCREF(__pyx_v_ci);
19313  __Pyx_GIVEREF(__pyx_v_ci);
19314  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ci);
19315  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 899, __pyx_L1_error)
19316  __Pyx_GOTREF(__pyx_t_1);
19317  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19318  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19319  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 899, __pyx_L1_error)
19320  __Pyx_GOTREF(__pyx_t_11);
19321  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19322  __pyx_t_1 = NULL;
19323  __pyx_t_18 = 0;
19324  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
19325  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
19326  if (likely(__pyx_t_1)) {
19327  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19328  __Pyx_INCREF(__pyx_t_1);
19329  __Pyx_INCREF(function);
19330  __Pyx_DECREF_SET(__pyx_t_2, function);
19331  __pyx_t_18 = 1;
19332  }
19333  }
19334  #if CYTHON_FAST_PYCALL
19335  if (PyFunction_Check(__pyx_t_2)) {
19336  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_11, __pyx_n_s_i};
19337  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 899, __pyx_L1_error)
19338  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
19339  __Pyx_GOTREF(__pyx_t_7);
19340  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19341  } else
19342  #endif
19343  #if CYTHON_FAST_PYCCALL
19344  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
19345  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_11, __pyx_n_s_i};
19346  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 899, __pyx_L1_error)
19347  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
19348  __Pyx_GOTREF(__pyx_t_7);
19349  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19350  } else
19351  #endif
19352  {
19353  __pyx_t_6 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 899, __pyx_L1_error)
19354  __Pyx_GOTREF(__pyx_t_6);
19355  if (__pyx_t_1) {
19356  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
19357  }
19358  __Pyx_GIVEREF(__pyx_t_11);
19359  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_18, __pyx_t_11);
19360  __Pyx_INCREF(__pyx_n_s_i);
19361  __Pyx_GIVEREF(__pyx_n_s_i);
19362  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_18, __pyx_n_s_i);
19363  __pyx_t_11 = 0;
19364  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 899, __pyx_L1_error)
19365  __Pyx_GOTREF(__pyx_t_7);
19366  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19367  }
19368  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19369  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 899, __pyx_L1_error)
19370  __Pyx_GOTREF(__pyx_t_2);
19371  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 899, __pyx_L1_error)
19372  __Pyx_GOTREF(__pyx_t_6);
19373  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc_flag);
19374  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc_flag);
19375  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_advectiveFlux_bc_flag);
19376  __Pyx_INCREF(__pyx_v_ci);
19377  __Pyx_GIVEREF(__pyx_v_ci);
19378  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ci);
19379  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_6, __pyx_t_7) < 0)) __PYX_ERR(1, 899, __pyx_L1_error)
19380  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19381  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19382  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19383 
19384  /* "ADR.pyx":900
19385  * for ci,fbcObject in self.fluxBoundaryConditionsObjectsDict.iteritems():
19386  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19387  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems(): # <<<<<<<<<<<<<<
19388  * if self.coefficients.advection.has_key(ci):
19389  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19390  */
19391  __pyx_t_12 = 0;
19392  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fbcObject, __pyx_n_s_advectiveFluxBoundaryConditionsD); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 900, __pyx_L1_error)
19393  __Pyx_GOTREF(__pyx_t_6);
19394  if (unlikely(__pyx_t_6 == Py_None)) {
19395  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
19396  __PYX_ERR(1, 900, __pyx_L1_error)
19397  }
19398  __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_6, 0, __pyx_n_s_iteritems, (&__pyx_t_19), (&__pyx_t_18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 900, __pyx_L1_error)
19399  __Pyx_GOTREF(__pyx_t_2);
19400  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19401  __Pyx_XDECREF(__pyx_t_7);
19402  __pyx_t_7 = __pyx_t_2;
19403  __pyx_t_2 = 0;
19404  while (1) {
19405  __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_19, &__pyx_t_12, &__pyx_t_2, &__pyx_t_6, NULL, __pyx_t_18);
19406  if (unlikely(__pyx_t_20 == 0)) break;
19407  if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(1, 900, __pyx_L1_error)
19408  __Pyx_GOTREF(__pyx_t_2);
19409  __Pyx_GOTREF(__pyx_t_6);
19410  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
19411  __pyx_t_2 = 0;
19412  __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_6);
19413  __pyx_t_6 = 0;
19414 
19415  /* "ADR.pyx":901
19416  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19417  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19418  * if self.coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
19419  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19420  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19421  */
19422  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 901, __pyx_L1_error)
19423  __Pyx_GOTREF(__pyx_t_2);
19424  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_advection); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 901, __pyx_L1_error)
19425  __Pyx_GOTREF(__pyx_t_11);
19426  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19427  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_has_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 901, __pyx_L1_error)
19428  __Pyx_GOTREF(__pyx_t_2);
19429  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19430  __pyx_t_11 = NULL;
19431  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19432  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
19433  if (likely(__pyx_t_11)) {
19434  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19435  __Pyx_INCREF(__pyx_t_11);
19436  __Pyx_INCREF(function);
19437  __Pyx_DECREF_SET(__pyx_t_2, function);
19438  }
19439  }
19440  __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_ci) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ci);
19441  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
19442  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 901, __pyx_L1_error)
19443  __Pyx_GOTREF(__pyx_t_6);
19444  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19445  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(1, 901, __pyx_L1_error)
19446  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19447  if (__pyx_t_17) {
19448 
19449  /* "ADR.pyx":902
19450  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19451  * if self.coefficients.advection.has_key(ci):
19452  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t) # <<<<<<<<<<<<<<
19453  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19454  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19455  */
19456  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 902, __pyx_L1_error)
19457  __Pyx_GOTREF(__pyx_t_2);
19458  __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_x); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 902, __pyx_L1_error)
19459  __Pyx_GOTREF(__pyx_t_11);
19460  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19461  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 902, __pyx_L1_error)
19462  __Pyx_GOTREF(__pyx_t_2);
19463  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 902, __pyx_L1_error)
19464  __Pyx_GOTREF(__pyx_t_1);
19465  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 902, __pyx_L1_error)
19466  __Pyx_GOTREF(__pyx_t_21);
19467  __Pyx_GIVEREF(__pyx_t_2);
19468  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_2);
19469  __Pyx_GIVEREF(__pyx_t_1);
19470  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_1);
19471  __pyx_t_2 = 0;
19472  __pyx_t_1 = 0;
19473  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_21); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 902, __pyx_L1_error)
19474  __Pyx_GOTREF(__pyx_t_1);
19475  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19476  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19477  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 902, __pyx_L1_error)
19478  __Pyx_GOTREF(__pyx_t_21);
19479  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_t); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 902, __pyx_L1_error)
19480  __Pyx_GOTREF(__pyx_t_11);
19481  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19482  __Pyx_INCREF(__pyx_v_g);
19483  __pyx_t_21 = __pyx_v_g; __pyx_t_2 = NULL;
19484  __pyx_t_20 = 0;
19485  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_21))) {
19486  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_21);
19487  if (likely(__pyx_t_2)) {
19488  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
19489  __Pyx_INCREF(__pyx_t_2);
19490  __Pyx_INCREF(function);
19491  __Pyx_DECREF_SET(__pyx_t_21, function);
19492  __pyx_t_20 = 1;
19493  }
19494  }
19495  #if CYTHON_FAST_PYCALL
19496  if (PyFunction_Check(__pyx_t_21)) {
19497  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_t_11};
19498  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_21, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 902, __pyx_L1_error)
19499  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19500  __Pyx_GOTREF(__pyx_t_6);
19501  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19502  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19503  } else
19504  #endif
19505  #if CYTHON_FAST_PYCCALL
19506  if (__Pyx_PyFastCFunction_Check(__pyx_t_21)) {
19507  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_t_11};
19508  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_21, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 902, __pyx_L1_error)
19509  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19510  __Pyx_GOTREF(__pyx_t_6);
19511  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19512  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19513  } else
19514  #endif
19515  {
19516  __pyx_t_22 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 902, __pyx_L1_error)
19517  __Pyx_GOTREF(__pyx_t_22);
19518  if (__pyx_t_2) {
19519  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_2); __pyx_t_2 = NULL;
19520  }
19521  __Pyx_GIVEREF(__pyx_t_1);
19522  PyTuple_SET_ITEM(__pyx_t_22, 0+__pyx_t_20, __pyx_t_1);
19523  __Pyx_GIVEREF(__pyx_t_11);
19524  PyTuple_SET_ITEM(__pyx_t_22, 1+__pyx_t_20, __pyx_t_11);
19525  __pyx_t_1 = 0;
19526  __pyx_t_11 = 0;
19527  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_22, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 902, __pyx_L1_error)
19528  __Pyx_GOTREF(__pyx_t_6);
19529  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19530  }
19531  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19532  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 902, __pyx_L1_error)
19533  __Pyx_GOTREF(__pyx_t_21);
19534  __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 902, __pyx_L1_error)
19535  __Pyx_GOTREF(__pyx_t_22);
19536  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc);
19537  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc);
19538  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_n_s_advectiveFlux_bc);
19539  __Pyx_INCREF(__pyx_v_ci);
19540  __Pyx_GIVEREF(__pyx_v_ci);
19541  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_ci);
19542  __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_t_22); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 902, __pyx_L1_error)
19543  __Pyx_GOTREF(__pyx_t_11);
19544  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19545  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19546  __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 902, __pyx_L1_error)
19547  __Pyx_GOTREF(__pyx_t_22);
19548  __pyx_t_21 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 902, __pyx_L1_error)
19549  __Pyx_GOTREF(__pyx_t_21);
19550  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 902, __pyx_L1_error)
19551  __Pyx_GOTREF(__pyx_t_1);
19552  __Pyx_GIVEREF(__pyx_t_22);
19553  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_22);
19554  __Pyx_GIVEREF(__pyx_t_21);
19555  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_21);
19556  __pyx_t_22 = 0;
19557  __pyx_t_21 = 0;
19558  if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_t_1, __pyx_t_6) < 0)) __PYX_ERR(1, 902, __pyx_L1_error)
19559  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19560  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19561  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19562 
19563  /* "ADR.pyx":903
19564  * if self.coefficients.advection.has_key(ci):
19565  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19566  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1 # <<<<<<<<<<<<<<
19567  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19568  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
19569  */
19570  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 903, __pyx_L1_error)
19571  __Pyx_GOTREF(__pyx_t_6);
19572  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 903, __pyx_L1_error)
19573  __Pyx_GOTREF(__pyx_t_1);
19574  __Pyx_INCREF(__pyx_n_s_advectiveFlux_bc_flag);
19575  __Pyx_GIVEREF(__pyx_n_s_advectiveFlux_bc_flag);
19576  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_advectiveFlux_bc_flag);
19577  __Pyx_INCREF(__pyx_v_ci);
19578  __Pyx_GIVEREF(__pyx_v_ci);
19579  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ci);
19580  __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 903, __pyx_L1_error)
19581  __Pyx_GOTREF(__pyx_t_11);
19582  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19583  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19584  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 903, __pyx_L1_error)
19585  __Pyx_GOTREF(__pyx_t_1);
19586  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 903, __pyx_L1_error)
19587  __Pyx_GOTREF(__pyx_t_6);
19588  __pyx_t_21 = PyTuple_New(2); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 903, __pyx_L1_error)
19589  __Pyx_GOTREF(__pyx_t_21);
19590  __Pyx_GIVEREF(__pyx_t_1);
19591  PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_1);
19592  __Pyx_GIVEREF(__pyx_t_6);
19593  PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_6);
19594  __pyx_t_1 = 0;
19595  __pyx_t_6 = 0;
19596  if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_t_21, __pyx_int_1) < 0)) __PYX_ERR(1, 903, __pyx_L1_error)
19597  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19598  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19599 
19600  /* "ADR.pyx":901
19601  * self.ebqe[('advectiveFlux_bc_flag',ci)] = numpy.zeros(self.ebqe[('advectiveFlux_bc',ci)].shape,'i')
19602  * for t,g in fbcObject.advectiveFluxBoundaryConditionsDict.iteritems():
19603  * if self.coefficients.advection.has_key(ci): # <<<<<<<<<<<<<<
19604  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19605  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19606  */
19607  }
19608  }
19609  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19610 
19611  /* "ADR.pyx":904
19612  * self.ebqe[('advectiveFlux_bc',ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19613  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19614  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems(): # <<<<<<<<<<<<<<
19615  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
19616  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
19617  */
19618  __pyx_t_19 = 0;
19619  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_fbcObject, __pyx_n_s_diffusiveFluxBoundaryConditionsD); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 904, __pyx_L1_error)
19620  __Pyx_GOTREF(__pyx_t_21);
19621  if (unlikely(__pyx_t_21 == Py_None)) {
19622  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
19623  __PYX_ERR(1, 904, __pyx_L1_error)
19624  }
19625  __pyx_t_11 = __Pyx_dict_iterator(__pyx_t_21, 0, __pyx_n_s_iteritems, (&__pyx_t_12), (&__pyx_t_18)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 904, __pyx_L1_error)
19626  __Pyx_GOTREF(__pyx_t_11);
19627  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19628  __Pyx_XDECREF(__pyx_t_7);
19629  __pyx_t_7 = __pyx_t_11;
19630  __pyx_t_11 = 0;
19631  while (1) {
19632  __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_12, &__pyx_t_19, &__pyx_t_11, &__pyx_t_21, NULL, __pyx_t_18);
19633  if (unlikely(__pyx_t_20 == 0)) break;
19634  if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(1, 904, __pyx_L1_error)
19635  __Pyx_GOTREF(__pyx_t_11);
19636  __Pyx_GOTREF(__pyx_t_21);
19637  __Pyx_XDECREF_SET(__pyx_v_ck, __pyx_t_11);
19638  __pyx_t_11 = 0;
19639  __Pyx_XDECREF_SET(__pyx_v_diffusiveFluxBoundaryConditionsDict, __pyx_t_21);
19640  __pyx_t_21 = 0;
19641 
19642  /* "ADR.pyx":905
19643  * self.ebqe[('advectiveFlux_bc_flag',ci)][t[0],t[1]] = 1
19644  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19645  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i') # <<<<<<<<<<<<<<
19646  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
19647  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19648  */
19649  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 905, __pyx_L1_error)
19650  __Pyx_GOTREF(__pyx_t_11);
19651  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 905, __pyx_L1_error)
19652  __Pyx_GOTREF(__pyx_t_6);
19653  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19654  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 905, __pyx_L1_error)
19655  __Pyx_GOTREF(__pyx_t_11);
19656  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 905, __pyx_L1_error)
19657  __Pyx_GOTREF(__pyx_t_1);
19658  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc);
19659  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc);
19660  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_diffusiveFlux_bc);
19661  __Pyx_INCREF(__pyx_v_ck);
19662  __Pyx_GIVEREF(__pyx_v_ck);
19663  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ck);
19664  __Pyx_INCREF(__pyx_v_ci);
19665  __Pyx_GIVEREF(__pyx_v_ci);
19666  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_ci);
19667  __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 905, __pyx_L1_error)
19668  __Pyx_GOTREF(__pyx_t_22);
19669  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19670  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19671  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 905, __pyx_L1_error)
19672  __Pyx_GOTREF(__pyx_t_1);
19673  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19674  __pyx_t_22 = NULL;
19675  __pyx_t_20 = 0;
19676  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
19677  __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_6);
19678  if (likely(__pyx_t_22)) {
19679  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
19680  __Pyx_INCREF(__pyx_t_22);
19681  __Pyx_INCREF(function);
19682  __Pyx_DECREF_SET(__pyx_t_6, function);
19683  __pyx_t_20 = 1;
19684  }
19685  }
19686  #if CYTHON_FAST_PYCALL
19687  if (PyFunction_Check(__pyx_t_6)) {
19688  PyObject *__pyx_temp[3] = {__pyx_t_22, __pyx_t_1, __pyx_n_s_i};
19689  __pyx_t_21 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 905, __pyx_L1_error)
19690  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
19691  __Pyx_GOTREF(__pyx_t_21);
19692  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19693  } else
19694  #endif
19695  #if CYTHON_FAST_PYCCALL
19696  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
19697  PyObject *__pyx_temp[3] = {__pyx_t_22, __pyx_t_1, __pyx_n_s_i};
19698  __pyx_t_21 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 905, __pyx_L1_error)
19699  __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
19700  __Pyx_GOTREF(__pyx_t_21);
19701  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19702  } else
19703  #endif
19704  {
19705  __pyx_t_11 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 905, __pyx_L1_error)
19706  __Pyx_GOTREF(__pyx_t_11);
19707  if (__pyx_t_22) {
19708  __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_22); __pyx_t_22 = NULL;
19709  }
19710  __Pyx_GIVEREF(__pyx_t_1);
19711  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_20, __pyx_t_1);
19712  __Pyx_INCREF(__pyx_n_s_i);
19713  __Pyx_GIVEREF(__pyx_n_s_i);
19714  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_20, __pyx_n_s_i);
19715  __pyx_t_1 = 0;
19716  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 905, __pyx_L1_error)
19717  __Pyx_GOTREF(__pyx_t_21);
19718  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19719  }
19720  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19721  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 905, __pyx_L1_error)
19722  __Pyx_GOTREF(__pyx_t_6);
19723  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 905, __pyx_L1_error)
19724  __Pyx_GOTREF(__pyx_t_11);
19725  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc_flag);
19726  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc_flag);
19727  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_diffusiveFlux_bc_flag);
19728  __Pyx_INCREF(__pyx_v_ck);
19729  __Pyx_GIVEREF(__pyx_v_ck);
19730  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_ck);
19731  __Pyx_INCREF(__pyx_v_ci);
19732  __Pyx_GIVEREF(__pyx_v_ci);
19733  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_ci);
19734  if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_11, __pyx_t_21) < 0)) __PYX_ERR(1, 905, __pyx_L1_error)
19735  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19736  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19737  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19738 
19739  /* "ADR.pyx":906
19740  * for ck,diffusiveFluxBoundaryConditionsDict in fbcObject.diffusiveFluxBoundaryConditionsDictDict.iteritems():
19741  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
19742  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems(): # <<<<<<<<<<<<<<
19743  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19744  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
19745  */
19746  __pyx_t_23 = 0;
19747  if (unlikely(__pyx_v_diffusiveFluxBoundaryConditionsDict == Py_None)) {
19748  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
19749  __PYX_ERR(1, 906, __pyx_L1_error)
19750  }
19751  __pyx_t_11 = __Pyx_dict_iterator(__pyx_v_diffusiveFluxBoundaryConditionsDict, 0, __pyx_n_s_iteritems, (&__pyx_t_24), (&__pyx_t_20)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 906, __pyx_L1_error)
19752  __Pyx_GOTREF(__pyx_t_11);
19753  __Pyx_XDECREF(__pyx_t_21);
19754  __pyx_t_21 = __pyx_t_11;
19755  __pyx_t_11 = 0;
19756  while (1) {
19757  __pyx_t_25 = __Pyx_dict_iter_next(__pyx_t_21, __pyx_t_24, &__pyx_t_23, &__pyx_t_11, &__pyx_t_6, NULL, __pyx_t_20);
19758  if (unlikely(__pyx_t_25 == 0)) break;
19759  if (unlikely(__pyx_t_25 == -1)) __PYX_ERR(1, 906, __pyx_L1_error)
19760  __Pyx_GOTREF(__pyx_t_11);
19761  __Pyx_GOTREF(__pyx_t_6);
19762  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_11);
19763  __pyx_t_11 = 0;
19764  __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_6);
19765  __pyx_t_6 = 0;
19766 
19767  /* "ADR.pyx":907
19768  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)] = numpy.zeros(self.ebqe[('diffusiveFlux_bc',ck,ci)].shape,'i')
19769  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
19770  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t) # <<<<<<<<<<<<<<
19771  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
19772  * self.numericalFlux.setDirichletValues(self.ebqe)
19773  */
19774  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 907, __pyx_L1_error)
19775  __Pyx_GOTREF(__pyx_t_11);
19776  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 907, __pyx_L1_error)
19777  __Pyx_GOTREF(__pyx_t_1);
19778  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19779  __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 907, __pyx_L1_error)
19780  __Pyx_GOTREF(__pyx_t_11);
19781  __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 907, __pyx_L1_error)
19782  __Pyx_GOTREF(__pyx_t_22);
19783  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 907, __pyx_L1_error)
19784  __Pyx_GOTREF(__pyx_t_2);
19785  __Pyx_GIVEREF(__pyx_t_11);
19786  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
19787  __Pyx_GIVEREF(__pyx_t_22);
19788  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_22);
19789  __pyx_t_11 = 0;
19790  __pyx_t_22 = 0;
19791  __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 907, __pyx_L1_error)
19792  __Pyx_GOTREF(__pyx_t_22);
19793  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19794  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19795  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 907, __pyx_L1_error)
19796  __Pyx_GOTREF(__pyx_t_2);
19797  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 907, __pyx_L1_error)
19798  __Pyx_GOTREF(__pyx_t_1);
19799  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19800  __Pyx_INCREF(__pyx_v_g);
19801  __pyx_t_2 = __pyx_v_g; __pyx_t_11 = NULL;
19802  __pyx_t_25 = 0;
19803  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
19804  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
19805  if (likely(__pyx_t_11)) {
19806  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19807  __Pyx_INCREF(__pyx_t_11);
19808  __Pyx_INCREF(function);
19809  __Pyx_DECREF_SET(__pyx_t_2, function);
19810  __pyx_t_25 = 1;
19811  }
19812  }
19813  #if CYTHON_FAST_PYCALL
19814  if (PyFunction_Check(__pyx_t_2)) {
19815  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_22, __pyx_t_1};
19816  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 907, __pyx_L1_error)
19817  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
19818  __Pyx_GOTREF(__pyx_t_6);
19819  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19820  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19821  } else
19822  #endif
19823  #if CYTHON_FAST_PYCCALL
19824  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
19825  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_22, __pyx_t_1};
19826  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_25, 2+__pyx_t_25); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 907, __pyx_L1_error)
19827  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
19828  __Pyx_GOTREF(__pyx_t_6);
19829  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19830  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19831  } else
19832  #endif
19833  {
19834  __pyx_t_26 = PyTuple_New(2+__pyx_t_25); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 907, __pyx_L1_error)
19835  __Pyx_GOTREF(__pyx_t_26);
19836  if (__pyx_t_11) {
19837  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_11); __pyx_t_11 = NULL;
19838  }
19839  __Pyx_GIVEREF(__pyx_t_22);
19840  PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_25, __pyx_t_22);
19841  __Pyx_GIVEREF(__pyx_t_1);
19842  PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_25, __pyx_t_1);
19843  __pyx_t_22 = 0;
19844  __pyx_t_1 = 0;
19845  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_26, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 907, __pyx_L1_error)
19846  __Pyx_GOTREF(__pyx_t_6);
19847  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
19848  }
19849  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19850  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 907, __pyx_L1_error)
19851  __Pyx_GOTREF(__pyx_t_2);
19852  __pyx_t_26 = PyTuple_New(3); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 907, __pyx_L1_error)
19853  __Pyx_GOTREF(__pyx_t_26);
19854  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc);
19855  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc);
19856  PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_n_s_diffusiveFlux_bc);
19857  __Pyx_INCREF(__pyx_v_ck);
19858  __Pyx_GIVEREF(__pyx_v_ck);
19859  PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_v_ck);
19860  __Pyx_INCREF(__pyx_v_ci);
19861  __Pyx_GIVEREF(__pyx_v_ci);
19862  PyTuple_SET_ITEM(__pyx_t_26, 2, __pyx_v_ci);
19863  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_26); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 907, __pyx_L1_error)
19864  __Pyx_GOTREF(__pyx_t_1);
19865  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19866  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
19867  __pyx_t_26 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 907, __pyx_L1_error)
19868  __Pyx_GOTREF(__pyx_t_26);
19869  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 907, __pyx_L1_error)
19870  __Pyx_GOTREF(__pyx_t_2);
19871  __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 907, __pyx_L1_error)
19872  __Pyx_GOTREF(__pyx_t_22);
19873  __Pyx_GIVEREF(__pyx_t_26);
19874  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_26);
19875  __Pyx_GIVEREF(__pyx_t_2);
19876  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_t_2);
19877  __pyx_t_26 = 0;
19878  __pyx_t_2 = 0;
19879  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_22, __pyx_t_6) < 0)) __PYX_ERR(1, 907, __pyx_L1_error)
19880  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19881  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19882  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19883 
19884  /* "ADR.pyx":908
19885  * for t,g in diffusiveFluxBoundaryConditionsDict.iteritems():
19886  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19887  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1 # <<<<<<<<<<<<<<
19888  * self.numericalFlux.setDirichletValues(self.ebqe)
19889  * if self.movingDomain:
19890  */
19891  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 908, __pyx_L1_error)
19892  __Pyx_GOTREF(__pyx_t_6);
19893  __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 908, __pyx_L1_error)
19894  __Pyx_GOTREF(__pyx_t_22);
19895  __Pyx_INCREF(__pyx_n_s_diffusiveFlux_bc_flag);
19896  __Pyx_GIVEREF(__pyx_n_s_diffusiveFlux_bc_flag);
19897  PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_n_s_diffusiveFlux_bc_flag);
19898  __Pyx_INCREF(__pyx_v_ck);
19899  __Pyx_GIVEREF(__pyx_v_ck);
19900  PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_ck);
19901  __Pyx_INCREF(__pyx_v_ci);
19902  __Pyx_GIVEREF(__pyx_v_ci);
19903  PyTuple_SET_ITEM(__pyx_t_22, 2, __pyx_v_ci);
19904  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 908, __pyx_L1_error)
19905  __Pyx_GOTREF(__pyx_t_1);
19906  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19907  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
19908  __pyx_t_22 = __Pyx_GetItemInt(__pyx_v_t, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 908, __pyx_L1_error)
19909  __Pyx_GOTREF(__pyx_t_22);
19910  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_t, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 908, __pyx_L1_error)
19911  __Pyx_GOTREF(__pyx_t_6);
19912  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 908, __pyx_L1_error)
19913  __Pyx_GOTREF(__pyx_t_2);
19914  __Pyx_GIVEREF(__pyx_t_22);
19915  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_22);
19916  __Pyx_GIVEREF(__pyx_t_6);
19917  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6);
19918  __pyx_t_22 = 0;
19919  __pyx_t_6 = 0;
19920  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_int_1) < 0)) __PYX_ERR(1, 908, __pyx_L1_error)
19921  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19922  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19923  }
19924  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19925  }
19926  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19927  }
19928  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19929 
19930  /* "ADR.pyx":909
19931  * self.ebqe[('diffusiveFlux_bc',ck,ci)][t[0],t[1]] = g(self.ebqe[('x')][t[0],t[1]],self.timeIntegration.t)
19932  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
19933  * self.numericalFlux.setDirichletValues(self.ebqe) # <<<<<<<<<<<<<<
19934  * if self.movingDomain:
19935  * self.MOVING_DOMAIN=1.0
19936  */
19937  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 909, __pyx_L1_error)
19938  __Pyx_GOTREF(__pyx_t_7);
19939  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_setDirichletValues); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 909, __pyx_L1_error)
19940  __Pyx_GOTREF(__pyx_t_21);
19941  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19942  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 909, __pyx_L1_error)
19943  __Pyx_GOTREF(__pyx_t_7);
19944  __pyx_t_2 = NULL;
19945  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_21))) {
19946  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_21);
19947  if (likely(__pyx_t_2)) {
19948  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
19949  __Pyx_INCREF(__pyx_t_2);
19950  __Pyx_INCREF(function);
19951  __Pyx_DECREF_SET(__pyx_t_21, function);
19952  }
19953  }
19954  __pyx_t_15 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_21, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_t_7);
19955  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
19956  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19957  if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 909, __pyx_L1_error)
19958  __Pyx_GOTREF(__pyx_t_15);
19959  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
19960  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19961 
19962  /* "ADR.pyx":910
19963  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
19964  * self.numericalFlux.setDirichletValues(self.ebqe)
19965  * if self.movingDomain: # <<<<<<<<<<<<<<
19966  * self.MOVING_DOMAIN=1.0
19967  * else:
19968  */
19969  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 910, __pyx_L1_error)
19970  __Pyx_GOTREF(__pyx_t_15);
19971  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(1, 910, __pyx_L1_error)
19972  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
19973  if (__pyx_t_17) {
19974 
19975  /* "ADR.pyx":911
19976  * self.numericalFlux.setDirichletValues(self.ebqe)
19977  * if self.movingDomain:
19978  * self.MOVING_DOMAIN=1.0 # <<<<<<<<<<<<<<
19979  * else:
19980  * self.MOVING_DOMAIN=0.0
19981  */
19982  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_1_0) < 0) __PYX_ERR(1, 911, __pyx_L1_error)
19983 
19984  /* "ADR.pyx":910
19985  * self.ebqe[('diffusiveFlux_bc_flag',ck,ci)][t[0],t[1]] = 1
19986  * self.numericalFlux.setDirichletValues(self.ebqe)
19987  * if self.movingDomain: # <<<<<<<<<<<<<<
19988  * self.MOVING_DOMAIN=1.0
19989  * else:
19990  */
19991  goto __pyx_L132;
19992  }
19993 
19994  /* "ADR.pyx":913
19995  * self.MOVING_DOMAIN=1.0
19996  * else:
19997  * self.MOVING_DOMAIN=0.0 # <<<<<<<<<<<<<<
19998  * #cek hack
19999  * self.movingDomain=False
20000  */
20001  /*else*/ {
20002  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_0_0) < 0) __PYX_ERR(1, 913, __pyx_L1_error)
20003  }
20004  __pyx_L132:;
20005 
20006  /* "ADR.pyx":915
20007  * self.MOVING_DOMAIN=0.0
20008  * #cek hack
20009  * self.movingDomain=False # <<<<<<<<<<<<<<
20010  * self.MOVING_DOMAIN=0.0
20011  * if self.mesh.nodeVelocityArray is None:
20012  */
20013  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_movingDomain, Py_False) < 0) __PYX_ERR(1, 915, __pyx_L1_error)
20014 
20015  /* "ADR.pyx":916
20016  * #cek hack
20017  * self.movingDomain=False
20018  * self.MOVING_DOMAIN=0.0 # <<<<<<<<<<<<<<
20019  * if self.mesh.nodeVelocityArray is None:
20020  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20021  */
20022  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MOVING_DOMAIN, __pyx_float_0_0) < 0) __PYX_ERR(1, 916, __pyx_L1_error)
20023 
20024  /* "ADR.pyx":917
20025  * self.movingDomain=False
20026  * self.MOVING_DOMAIN=0.0
20027  * if self.mesh.nodeVelocityArray is None: # <<<<<<<<<<<<<<
20028  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20029  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20030  */
20031  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 917, __pyx_L1_error)
20032  __Pyx_GOTREF(__pyx_t_15);
20033  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nodeVelocityArray); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 917, __pyx_L1_error)
20034  __Pyx_GOTREF(__pyx_t_21);
20035  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20036  __pyx_t_17 = (__pyx_t_21 == Py_None);
20037  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20038  __pyx_t_8 = (__pyx_t_17 != 0);
20039  if (__pyx_t_8) {
20040 
20041  /* "ADR.pyx":918
20042  * self.MOVING_DOMAIN=0.0
20043  * if self.mesh.nodeVelocityArray is None:
20044  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d') # <<<<<<<<<<<<<<
20045  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20046  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20047  */
20048  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 918, __pyx_L1_error)
20049  __Pyx_GOTREF(__pyx_t_15);
20050  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 918, __pyx_L1_error)
20051  __Pyx_GOTREF(__pyx_t_7);
20052  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20053  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 918, __pyx_L1_error)
20054  __Pyx_GOTREF(__pyx_t_15);
20055  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __pyx_L1_error)
20056  __Pyx_GOTREF(__pyx_t_2);
20057  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20058  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 918, __pyx_L1_error)
20059  __Pyx_GOTREF(__pyx_t_15);
20060  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20061  __pyx_t_2 = NULL;
20062  __pyx_t_14 = 0;
20063  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
20064  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
20065  if (likely(__pyx_t_2)) {
20066  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
20067  __Pyx_INCREF(__pyx_t_2);
20068  __Pyx_INCREF(function);
20069  __Pyx_DECREF_SET(__pyx_t_7, function);
20070  __pyx_t_14 = 1;
20071  }
20072  }
20073  #if CYTHON_FAST_PYCALL
20074  if (PyFunction_Check(__pyx_t_7)) {
20075  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_n_s_d};
20076  __pyx_t_21 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 918, __pyx_L1_error)
20077  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20078  __Pyx_GOTREF(__pyx_t_21);
20079  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20080  } else
20081  #endif
20082  #if CYTHON_FAST_PYCCALL
20083  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
20084  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_n_s_d};
20085  __pyx_t_21 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 918, __pyx_L1_error)
20086  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20087  __Pyx_GOTREF(__pyx_t_21);
20088  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20089  } else
20090  #endif
20091  {
20092  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 918, __pyx_L1_error)
20093  __Pyx_GOTREF(__pyx_t_1);
20094  if (__pyx_t_2) {
20095  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
20096  }
20097  __Pyx_GIVEREF(__pyx_t_15);
20098  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_t_15);
20099  __Pyx_INCREF(__pyx_n_s_d);
20100  __Pyx_GIVEREF(__pyx_n_s_d);
20101  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_n_s_d);
20102  __pyx_t_15 = 0;
20103  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 918, __pyx_L1_error)
20104  __Pyx_GOTREF(__pyx_t_21);
20105  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20106  }
20107  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20108  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 918, __pyx_L1_error)
20109  __Pyx_GOTREF(__pyx_t_7);
20110  if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_nodeVelocityArray, __pyx_t_21) < 0) __PYX_ERR(1, 918, __pyx_L1_error)
20111  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20112  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20113 
20114  /* "ADR.pyx":917
20115  * self.movingDomain=False
20116  * self.MOVING_DOMAIN=0.0
20117  * if self.mesh.nodeVelocityArray is None: # <<<<<<<<<<<<<<
20118  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20119  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20120  */
20121  }
20122 
20123  /* "ADR.pyx":920
20124  * self.mesh.nodeVelocityArray = numpy.zeros(self.mesh.nodeArray.shape,'d')
20125  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20126  * self.forceStrongConditions=coefficients.forceStrongDirichlet # <<<<<<<<<<<<<<
20127  * self.dirichletConditionsForceDOF = {}
20128  * if self.forceStrongConditions:
20129  */
20130  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_coefficients, __pyx_n_s_forceStrongDirichlet); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 920, __pyx_L1_error)
20131  __Pyx_GOTREF(__pyx_t_7);
20132  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongConditions, __pyx_t_7) < 0) __PYX_ERR(1, 920, __pyx_L1_error)
20133  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20134 
20135  /* "ADR.pyx":921
20136  * #cek/ido todo replace python loops in modules with optimized code if possible/necessary
20137  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20138  * self.dirichletConditionsForceDOF = {} # <<<<<<<<<<<<<<
20139  * if self.forceStrongConditions:
20140  * for cj in range(self.nc):
20141  */
20142  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 921, __pyx_L1_error)
20143  __Pyx_GOTREF(__pyx_t_7);
20144  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditionsForceDOF, __pyx_t_7) < 0) __PYX_ERR(1, 921, __pyx_L1_error)
20145  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20146 
20147  /* "ADR.pyx":922
20148  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20149  * self.dirichletConditionsForceDOF = {}
20150  * if self.forceStrongConditions: # <<<<<<<<<<<<<<
20151  * for cj in range(self.nc):
20152  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20153  */
20154  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_forceStrongConditions); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 922, __pyx_L1_error)
20155  __Pyx_GOTREF(__pyx_t_7);
20156  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 922, __pyx_L1_error)
20157  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20158  if (__pyx_t_8) {
20159 
20160  /* "ADR.pyx":923
20161  * self.dirichletConditionsForceDOF = {}
20162  * if self.forceStrongConditions:
20163  * for cj in range(self.nc): # <<<<<<<<<<<<<<
20164  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20165  * compKernelFlag = 0
20166  */
20167  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nc); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 923, __pyx_L1_error)
20168  __Pyx_GOTREF(__pyx_t_7);
20169  __pyx_t_21 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 923, __pyx_L1_error)
20170  __Pyx_GOTREF(__pyx_t_21);
20171  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20172  if (likely(PyList_CheckExact(__pyx_t_21)) || PyTuple_CheckExact(__pyx_t_21)) {
20173  __pyx_t_7 = __pyx_t_21; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
20174  __pyx_t_5 = NULL;
20175  } else {
20176  __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_21); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 923, __pyx_L1_error)
20177  __Pyx_GOTREF(__pyx_t_7);
20178  __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 923, __pyx_L1_error)
20179  }
20180  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20181  for (;;) {
20182  if (likely(!__pyx_t_5)) {
20183  if (likely(PyList_CheckExact(__pyx_t_7))) {
20184  if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
20185  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20186  __pyx_t_21 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_21); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 923, __pyx_L1_error)
20187  #else
20188  __pyx_t_21 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 923, __pyx_L1_error)
20189  __Pyx_GOTREF(__pyx_t_21);
20190  #endif
20191  } else {
20192  if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
20193  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
20194  __pyx_t_21 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_21); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(1, 923, __pyx_L1_error)
20195  #else
20196  __pyx_t_21 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 923, __pyx_L1_error)
20197  __Pyx_GOTREF(__pyx_t_21);
20198  #endif
20199  }
20200  } else {
20201  __pyx_t_21 = __pyx_t_5(__pyx_t_7);
20202  if (unlikely(!__pyx_t_21)) {
20203  PyObject* exc_type = PyErr_Occurred();
20204  if (exc_type) {
20205  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
20206  else __PYX_ERR(1, 923, __pyx_L1_error)
20207  }
20208  break;
20209  }
20210  __Pyx_GOTREF(__pyx_t_21);
20211  }
20212  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_21);
20213  __pyx_t_21 = 0;
20214 
20215  /* "ADR.pyx":924
20216  * if self.forceStrongConditions:
20217  * for cj in range(self.nc):
20218  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False) # <<<<<<<<<<<<<<
20219  * compKernelFlag = 0
20220  * self.adr = ADR(self.nSpace_global,
20221  */
20222  __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_n_s_DOFBoundaryConditions); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 924, __pyx_L1_error)
20223  __Pyx_GOTREF(__pyx_t_21);
20224  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 924, __pyx_L1_error)
20225  __Pyx_GOTREF(__pyx_t_1);
20226  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_cj); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 924, __pyx_L1_error)
20227  __Pyx_GOTREF(__pyx_t_15);
20228  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20229  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 924, __pyx_L1_error)
20230  __Pyx_GOTREF(__pyx_t_1);
20231  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20232  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_dofBoundaryConditionsSetterDict, __pyx_v_cj); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 924, __pyx_L1_error)
20233  __Pyx_GOTREF(__pyx_t_15);
20234  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 924, __pyx_L1_error)
20235  __Pyx_GOTREF(__pyx_t_2);
20236  __Pyx_GIVEREF(__pyx_t_1);
20237  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
20238  __Pyx_GIVEREF(__pyx_t_15);
20239  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_15);
20240  __pyx_t_1 = 0;
20241  __pyx_t_15 = 0;
20242  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 924, __pyx_L1_error)
20243  __Pyx_GOTREF(__pyx_t_15);
20244  if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_weakDirichletConditions, Py_False) < 0) __PYX_ERR(1, 924, __pyx_L1_error)
20245  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_2, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 924, __pyx_L1_error)
20246  __Pyx_GOTREF(__pyx_t_1);
20247  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20248  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20249  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20250  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirichletConditionsForceDOF); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 924, __pyx_L1_error)
20251  __Pyx_GOTREF(__pyx_t_15);
20252  if (unlikely(PyObject_SetItem(__pyx_t_15, __pyx_v_cj, __pyx_t_1) < 0)) __PYX_ERR(1, 924, __pyx_L1_error)
20253  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20254  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20255 
20256  /* "ADR.pyx":923
20257  * self.dirichletConditionsForceDOF = {}
20258  * if self.forceStrongConditions:
20259  * for cj in range(self.nc): # <<<<<<<<<<<<<<
20260  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20261  * compKernelFlag = 0
20262  */
20263  }
20264  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20265 
20266  /* "ADR.pyx":922
20267  * self.forceStrongConditions=coefficients.forceStrongDirichlet
20268  * self.dirichletConditionsForceDOF = {}
20269  * if self.forceStrongConditions: # <<<<<<<<<<<<<<
20270  * for cj in range(self.nc):
20271  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20272  */
20273  }
20274 
20275  /* "ADR.pyx":925
20276  * for cj in range(self.nc):
20277  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20278  * compKernelFlag = 0 # <<<<<<<<<<<<<<
20279  * self.adr = ADR(self.nSpace_global,
20280  * self.nQuadraturePoints_element,
20281  */
20282  __pyx_v_compKernelFlag = 0;
20283 
20284  /* "ADR.pyx":926
20285  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20286  * compKernelFlag = 0
20287  * self.adr = ADR(self.nSpace_global, # <<<<<<<<<<<<<<
20288  * self.nQuadraturePoints_element,
20289  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20290  */
20291  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nSpace_global); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 926, __pyx_L1_error)
20292  __Pyx_GOTREF(__pyx_t_7);
20293 
20294  /* "ADR.pyx":927
20295  * compKernelFlag = 0
20296  * self.adr = ADR(self.nSpace_global,
20297  * self.nQuadraturePoints_element, # <<<<<<<<<<<<<<
20298  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20299  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20300  */
20301  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nQuadraturePoints_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 927, __pyx_L1_error)
20302  __Pyx_GOTREF(__pyx_t_1);
20303 
20304  /* "ADR.pyx":928
20305  * self.adr = ADR(self.nSpace_global,
20306  * self.nQuadraturePoints_element,
20307  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20308  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20309  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20310  */
20311  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 928, __pyx_L1_error)
20312  __Pyx_GOTREF(__pyx_t_15);
20313  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 928, __pyx_L1_error)
20314  __Pyx_GOTREF(__pyx_t_2);
20315  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20316  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 928, __pyx_L1_error)
20317  __Pyx_GOTREF(__pyx_t_15);
20318  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20319  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 928, __pyx_L1_error)
20320  __Pyx_GOTREF(__pyx_t_2);
20321  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20322  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 928, __pyx_L1_error)
20323  __Pyx_GOTREF(__pyx_t_15);
20324  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20325  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_dim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 928, __pyx_L1_error)
20326  __Pyx_GOTREF(__pyx_t_2);
20327  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20328 
20329  /* "ADR.pyx":929
20330  * self.nQuadraturePoints_element,
20331  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20332  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20333  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20334  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20335  */
20336  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 929, __pyx_L1_error)
20337  __Pyx_GOTREF(__pyx_t_15);
20338  __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 929, __pyx_L1_error)
20339  __Pyx_GOTREF(__pyx_t_21);
20340  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20341  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 929, __pyx_L1_error)
20342  __Pyx_GOTREF(__pyx_t_15);
20343  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20344  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 929, __pyx_L1_error)
20345  __Pyx_GOTREF(__pyx_t_21);
20346  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20347  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 929, __pyx_L1_error)
20348  __Pyx_GOTREF(__pyx_t_15);
20349  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
20350  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_dim); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 929, __pyx_L1_error)
20351  __Pyx_GOTREF(__pyx_t_21);
20352  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20353 
20354  /* "ADR.pyx":930
20355  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20356  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20357  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim, # <<<<<<<<<<<<<<
20358  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20359  * compKernelFlag)
20360  */
20361  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_testSpace); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 930, __pyx_L1_error)
20362  __Pyx_GOTREF(__pyx_t_15);
20363  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 930, __pyx_L1_error)
20364  __Pyx_GOTREF(__pyx_t_6);
20365  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20366  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_referenceFiniteElement); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 930, __pyx_L1_error)
20367  __Pyx_GOTREF(__pyx_t_15);
20368  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20369  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_localFunctionSpace); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 930, __pyx_L1_error)
20370  __Pyx_GOTREF(__pyx_t_6);
20371  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
20372  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dim); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 930, __pyx_L1_error)
20373  __Pyx_GOTREF(__pyx_t_15);
20374  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20375 
20376  /* "ADR.pyx":931
20377  * self.u[0].femSpace.referenceFiniteElement.localFunctionSpace.dim,
20378  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20379  * self.nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
20380  * compKernelFlag)
20381  * #mwf these are getting called by redistancing classes,
20382  */
20383  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 931, __pyx_L1_error)
20384  __Pyx_GOTREF(__pyx_t_6);
20385 
20386  /* "ADR.pyx":932
20387  * self.testSpace[0].referenceFiniteElement.localFunctionSpace.dim,
20388  * self.nElementBoundaryQuadraturePoints_elementBoundary,
20389  * compKernelFlag) # <<<<<<<<<<<<<<
20390  * #mwf these are getting called by redistancing classes,
20391  * def calculateCoefficients(self):
20392  */
20393  __pyx_t_22 = __Pyx_PyInt_From_long(__pyx_v_compKernelFlag); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 932, __pyx_L1_error)
20394  __Pyx_GOTREF(__pyx_t_22);
20395 
20396  /* "ADR.pyx":926
20397  * self.dirichletConditionsForceDOF[cj] = DOFBoundaryConditions(self.u[cj].femSpace,dofBoundaryConditionsSetterDict[cj],weakDirichletConditions=False)
20398  * compKernelFlag = 0
20399  * self.adr = ADR(self.nSpace_global, # <<<<<<<<<<<<<<
20400  * self.nQuadraturePoints_element,
20401  * self.u[0].femSpace.elementMaps.localFunctionSpace.dim,
20402  */
20403  __pyx_t_26 = PyTuple_New(7); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 926, __pyx_L1_error)
20404  __Pyx_GOTREF(__pyx_t_26);
20405  __Pyx_GIVEREF(__pyx_t_7);
20406  PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_7);
20407  __Pyx_GIVEREF(__pyx_t_1);
20408  PyTuple_SET_ITEM(__pyx_t_26, 1, __pyx_t_1);
20409  __Pyx_GIVEREF(__pyx_t_2);
20410  PyTuple_SET_ITEM(__pyx_t_26, 2, __pyx_t_2);
20411  __Pyx_GIVEREF(__pyx_t_21);
20412  PyTuple_SET_ITEM(__pyx_t_26, 3, __pyx_t_21);
20413  __Pyx_GIVEREF(__pyx_t_15);
20414  PyTuple_SET_ITEM(__pyx_t_26, 4, __pyx_t_15);
20415  __Pyx_GIVEREF(__pyx_t_6);
20416  PyTuple_SET_ITEM(__pyx_t_26, 5, __pyx_t_6);
20417  __Pyx_GIVEREF(__pyx_t_22);
20418  PyTuple_SET_ITEM(__pyx_t_26, 6, __pyx_t_22);
20419  __pyx_t_7 = 0;
20420  __pyx_t_1 = 0;
20421  __pyx_t_2 = 0;
20422  __pyx_t_21 = 0;
20423  __pyx_t_15 = 0;
20424  __pyx_t_6 = 0;
20425  __pyx_t_22 = 0;
20426  __pyx_t_22 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3ADR_ADR), __pyx_t_26, NULL); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 926, __pyx_L1_error)
20427  __Pyx_GOTREF(__pyx_t_22);
20428  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
20429  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_adr, __pyx_t_22) < 0) __PYX_ERR(1, 926, __pyx_L1_error)
20430  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
20431 
20432  /* "ADR.pyx":571
20433  * """
20434  * nCalls=0
20435  * def __init__(self, # <<<<<<<<<<<<<<
20436  * uDict,
20437  * phiDict,
20438  */
20439 
20440  /* function exit code */
20441  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20442  goto __pyx_L0;
20443  __pyx_L1_error:;
20444  __Pyx_XDECREF(__pyx_t_1);
20445  __Pyx_XDECREF(__pyx_t_2);
20446  __Pyx_XDECREF(__pyx_t_6);
20447  __Pyx_XDECREF(__pyx_t_7);
20448  __Pyx_XDECREF(__pyx_t_11);
20449  __Pyx_XDECREF(__pyx_t_15);
20450  __Pyx_XDECREF(__pyx_t_21);
20451  __Pyx_XDECREF(__pyx_t_22);
20452  __Pyx_XDECREF(__pyx_t_26);
20453  __Pyx_AddTraceback("ADR.LevelModel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20454  __pyx_r = NULL;
20455  __pyx_L0:;
20456  __Pyx_XDECREF(__pyx_v_Comm);
20457  __Pyx_XDECREF(__pyx_v_ci);
20458  __Pyx_XDECREF(__pyx_v_flag);
20459  __Pyx_XDECREF(__pyx_v_diffusionDict);
20460  __Pyx_XDECREF(__pyx_v_elementQuadratureDict);
20461  __Pyx_XDECREF(__pyx_v_I);
20462  __Pyx_XDECREF(__pyx_v_elementBoundaryQuadratureDict);
20463  __Pyx_XDECREF(__pyx_v_cj);
20464  __Pyx_XDECREF(__pyx_v_ebNE);
20465  __Pyx_XDECREF(__pyx_v_ebN);
20466  __Pyx_XDECREF(__pyx_v_eN_global);
20467  __Pyx_XDECREF(__pyx_v_ebN_element);
20468  __Pyx_XDECREF(__pyx_v_i);
20469  __Pyx_XDECREF(__pyx_v_nI);
20470  __Pyx_XDECREF(__pyx_v_n);
20471  __Pyx_XDECREF(__pyx_v_comm);
20472  __Pyx_XDECREF(__pyx_v_k);
20473  __Pyx_XDECREF(__pyx_v_PostProcessingTools);
20474  __Pyx_XDECREF(__pyx_v_Archiver);
20475  __Pyx_XDECREF(__pyx_v_fbcObject);
20476  __Pyx_XDECREF(__pyx_v_t);
20477  __Pyx_XDECREF(__pyx_v_g);
20478  __Pyx_XDECREF(__pyx_v_ck);
20479  __Pyx_XDECREF(__pyx_v_diffusiveFluxBoundaryConditionsDict);
20480  __Pyx_XDECREF(__pyx_v_u_j);
20481  __Pyx_XDECREF(__pyx_v_phi_k);
20482  __Pyx_XDECREF(__pyx_v_femSpace);
20483  __Pyx_XDECREF(__pyx_v_dc);
20484  __Pyx_XGIVEREF(__pyx_r);
20485  __Pyx_RefNannyFinishContext();
20486  return __pyx_r;
20487 }
20488 
20489 /* "ADR.pyx":934
20490  * compKernelFlag)
20491  * #mwf these are getting called by redistancing classes,
20492  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
20493  * pass
20494  * def getResidual(self,u,r):
20495  */
20496 
20497 /* Python wrapper */
20498 static PyObject *__pyx_pw_3ADR_10LevelModel_3calculateCoefficients(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
20499 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_3calculateCoefficients = {"calculateCoefficients", (PyCFunction)__pyx_pw_3ADR_10LevelModel_3calculateCoefficients, METH_O, 0};
20500 static PyObject *__pyx_pw_3ADR_10LevelModel_3calculateCoefficients(PyObject *__pyx_self, PyObject *__pyx_v_self) {
20501  PyObject *__pyx_r = 0;
20502  __Pyx_RefNannyDeclarations
20503  __Pyx_RefNannySetupContext("calculateCoefficients (wrapper)", 0);
20504  __pyx_r = __pyx_pf_3ADR_10LevelModel_2calculateCoefficients(__pyx_self, ((PyObject *)__pyx_v_self));
20505 
20506  /* function exit code */
20507  __Pyx_RefNannyFinishContext();
20508  return __pyx_r;
20509 }
20510 
20511 static PyObject *__pyx_pf_3ADR_10LevelModel_2calculateCoefficients(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
20512  PyObject *__pyx_r = NULL;
20513  __Pyx_RefNannyDeclarations
20514  __Pyx_RefNannySetupContext("calculateCoefficients", 0);
20515 
20516  /* function exit code */
20517  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20518  __Pyx_XGIVEREF(__pyx_r);
20519  __Pyx_RefNannyFinishContext();
20520  return __pyx_r;
20521 }
20522 
20523 /* "ADR.pyx":936
20524  * def calculateCoefficients(self):
20525  * pass
20526  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
20527  * import pdb
20528  * import copy
20529  */
20530 
20531 /* Python wrapper */
20532 static PyObject *__pyx_pw_3ADR_10LevelModel_5getResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20533 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_5getResidual = {"getResidual", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_10LevelModel_5getResidual, METH_VARARGS|METH_KEYWORDS, 0};
20534 static PyObject *__pyx_pw_3ADR_10LevelModel_5getResidual(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20535  PyObject *__pyx_v_self = 0;
20536  PyObject *__pyx_v_u = 0;
20537  PyObject *__pyx_v_r = 0;
20538  PyObject *__pyx_r = 0;
20539  __Pyx_RefNannyDeclarations
20540  __Pyx_RefNannySetupContext("getResidual (wrapper)", 0);
20541  {
20542  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_u,&__pyx_n_s_r,0};
20543  PyObject* values[3] = {0,0,0};
20544  if (unlikely(__pyx_kwds)) {
20545  Py_ssize_t kw_args;
20546  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20547  switch (pos_args) {
20548  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20549  CYTHON_FALLTHROUGH;
20550  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20551  CYTHON_FALLTHROUGH;
20552  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20553  CYTHON_FALLTHROUGH;
20554  case 0: break;
20555  default: goto __pyx_L5_argtuple_error;
20556  }
20557  kw_args = PyDict_Size(__pyx_kwds);
20558  switch (pos_args) {
20559  case 0:
20560  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
20561  else goto __pyx_L5_argtuple_error;
20562  CYTHON_FALLTHROUGH;
20563  case 1:
20564  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
20565  else {
20566  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, 1); __PYX_ERR(1, 936, __pyx_L3_error)
20567  }
20568  CYTHON_FALLTHROUGH;
20569  case 2:
20570  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
20571  else {
20572  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, 2); __PYX_ERR(1, 936, __pyx_L3_error)
20573  }
20574  }
20575  if (unlikely(kw_args > 0)) {
20576  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getResidual") < 0)) __PYX_ERR(1, 936, __pyx_L3_error)
20577  }
20578  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
20579  goto __pyx_L5_argtuple_error;
20580  } else {
20581  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20582  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20583  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20584  }
20585  __pyx_v_self = values[0];
20586  __pyx_v_u = values[1];
20587  __pyx_v_r = values[2];
20588  }
20589  goto __pyx_L4_argument_unpacking_done;
20590  __pyx_L5_argtuple_error:;
20591  __Pyx_RaiseArgtupleInvalid("getResidual", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 936, __pyx_L3_error)
20592  __pyx_L3_error:;
20593  __Pyx_AddTraceback("ADR.LevelModel.getResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
20594  __Pyx_RefNannyFinishContext();
20595  return NULL;
20596  __pyx_L4_argument_unpacking_done:;
20597  __pyx_r = __pyx_pf_3ADR_10LevelModel_4getResidual(__pyx_self, __pyx_v_self, __pyx_v_u, __pyx_v_r);
20598 
20599  /* function exit code */
20600  __Pyx_RefNannyFinishContext();
20601  return __pyx_r;
20602 }
20603 
20604 static PyObject *__pyx_pf_3ADR_10LevelModel_4getResidual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_r) {
20605  CYTHON_UNUSED PyObject *__pyx_v_pdb = NULL;
20606  CYTHON_UNUSED PyObject *__pyx_v_copy = NULL;
20607  PyObject *__pyx_r = NULL;
20608  __Pyx_RefNannyDeclarations
20609  PyObject *__pyx_t_1 = NULL;
20610  PyObject *__pyx_t_2 = NULL;
20611  PyObject *__pyx_t_3 = NULL;
20612  PyObject *__pyx_t_4 = NULL;
20613  PyObject *__pyx_t_5 = NULL;
20614  PyObject *__pyx_t_6 = NULL;
20615  PyObject *__pyx_t_7 = NULL;
20616  PyObject *__pyx_t_8 = NULL;
20617  PyObject *__pyx_t_9 = NULL;
20618  PyObject *__pyx_t_10 = NULL;
20619  PyObject *__pyx_t_11 = NULL;
20620  PyObject *__pyx_t_12 = NULL;
20621  PyObject *__pyx_t_13 = NULL;
20622  PyObject *__pyx_t_14 = NULL;
20623  PyObject *__pyx_t_15 = NULL;
20624  PyObject *__pyx_t_16 = NULL;
20625  PyObject *__pyx_t_17 = NULL;
20626  PyObject *__pyx_t_18 = NULL;
20627  PyObject *__pyx_t_19 = NULL;
20628  PyObject *__pyx_t_20 = NULL;
20629  PyObject *__pyx_t_21 = NULL;
20630  PyObject *__pyx_t_22 = NULL;
20631  PyObject *__pyx_t_23 = NULL;
20632  PyObject *__pyx_t_24 = NULL;
20633  PyObject *__pyx_t_25 = NULL;
20634  PyObject *__pyx_t_26 = NULL;
20635  PyObject *__pyx_t_27 = NULL;
20636  PyObject *__pyx_t_28 = NULL;
20637  PyObject *__pyx_t_29 = NULL;
20638  PyObject *__pyx_t_30 = NULL;
20639  PyObject *__pyx_t_31 = NULL;
20640  PyObject *__pyx_t_32 = NULL;
20641  PyObject *__pyx_t_33 = NULL;
20642  PyObject *__pyx_t_34 = NULL;
20643  PyObject *__pyx_t_35 = NULL;
20644  PyObject *__pyx_t_36 = NULL;
20645  PyObject *__pyx_t_37 = NULL;
20646  PyObject *__pyx_t_38 = NULL;
20647  PyObject *__pyx_t_39 = NULL;
20648  PyObject *__pyx_t_40 = NULL;
20649  PyObject *__pyx_t_41 = NULL;
20650  PyObject *__pyx_t_42 = NULL;
20651  PyObject *__pyx_t_43 = NULL;
20652  PyObject *__pyx_t_44 = NULL;
20653  PyObject *__pyx_t_45 = NULL;
20654  PyObject *__pyx_t_46 = NULL;
20655  PyObject *__pyx_t_47 = NULL;
20656  PyObject *__pyx_t_48 = NULL;
20657  PyObject *__pyx_t_49 = NULL;
20658  PyObject *__pyx_t_50 = NULL;
20659  PyObject *__pyx_t_51 = NULL;
20660  PyObject *__pyx_t_52 = NULL;
20661  PyObject *__pyx_t_53 = NULL;
20662  PyObject *__pyx_t_54 = NULL;
20663  PyObject *__pyx_t_55 = NULL;
20664  int __pyx_t_56;
20665  PyObject *__pyx_t_57 = NULL;
20666  __Pyx_RefNannySetupContext("getResidual", 0);
20667 
20668  /* "ADR.pyx":937
20669  * pass
20670  * def getResidual(self,u,r):
20671  * import pdb # <<<<<<<<<<<<<<
20672  * import copy
20673  * """
20674  */
20675  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pdb, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 937, __pyx_L1_error)
20676  __Pyx_GOTREF(__pyx_t_1);
20677  __pyx_v_pdb = __pyx_t_1;
20678  __pyx_t_1 = 0;
20679 
20680  /* "ADR.pyx":938
20681  * def getResidual(self,u,r):
20682  * import pdb
20683  * import copy # <<<<<<<<<<<<<<
20684  * """
20685  * Calculate the element residuals and add in to the global residual
20686  */
20687  __pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 938, __pyx_L1_error)
20688  __Pyx_GOTREF(__pyx_t_1);
20689  __pyx_v_copy = __pyx_t_1;
20690  __pyx_t_1 = 0;
20691 
20692  /* "ADR.pyx":942
20693  * Calculate the element residuals and add in to the global residual
20694  * """
20695  * r.fill(0.0) # <<<<<<<<<<<<<<
20696  * #Load the unknowns into the finite element dof
20697  * self.setUnknowns(u)
20698  */
20699  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 942, __pyx_L1_error)
20700  __Pyx_GOTREF(__pyx_t_2);
20701  __pyx_t_3 = NULL;
20702  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
20703  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
20704  if (likely(__pyx_t_3)) {
20705  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20706  __Pyx_INCREF(__pyx_t_3);
20707  __Pyx_INCREF(function);
20708  __Pyx_DECREF_SET(__pyx_t_2, function);
20709  }
20710  }
20711  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_float_0_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_float_0_0);
20712  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20713  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 942, __pyx_L1_error)
20714  __Pyx_GOTREF(__pyx_t_1);
20715  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20716  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20717 
20718  /* "ADR.pyx":944
20719  * r.fill(0.0)
20720  * #Load the unknowns into the finite element dof
20721  * self.setUnknowns(u) # <<<<<<<<<<<<<<
20722  *
20723  *
20724  */
20725  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setUnknowns); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 944, __pyx_L1_error)
20726  __Pyx_GOTREF(__pyx_t_2);
20727  __pyx_t_3 = NULL;
20728  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
20729  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
20730  if (likely(__pyx_t_3)) {
20731  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20732  __Pyx_INCREF(__pyx_t_3);
20733  __Pyx_INCREF(function);
20734  __Pyx_DECREF_SET(__pyx_t_2, function);
20735  }
20736  }
20737  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_u) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_u);
20738  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20739  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 944, __pyx_L1_error)
20740  __Pyx_GOTREF(__pyx_t_1);
20741  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20742  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20743 
20744  /* "ADR.pyx":948
20745  *
20746  * #no flux boundary conditions
20747  * self.adr.calculateResidual(#element # <<<<<<<<<<<<<<
20748  * self.u[0].femSpace.elementMaps.psi,
20749  * self.u[0].femSpace.elementMaps.grad_psi,
20750  */
20751  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 948, __pyx_L1_error)
20752  __Pyx_GOTREF(__pyx_t_2);
20753  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_calculateResidual); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 948, __pyx_L1_error)
20754  __Pyx_GOTREF(__pyx_t_3);
20755  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20756 
20757  /* "ADR.pyx":949
20758  * #no flux boundary conditions
20759  * self.adr.calculateResidual(#element
20760  * self.u[0].femSpace.elementMaps.psi, # <<<<<<<<<<<<<<
20761  * self.u[0].femSpace.elementMaps.grad_psi,
20762  * self.mesh.nodeArray,
20763  */
20764  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 949, __pyx_L1_error)
20765  __Pyx_GOTREF(__pyx_t_2);
20766  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 949, __pyx_L1_error)
20767  __Pyx_GOTREF(__pyx_t_4);
20768  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20769  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 949, __pyx_L1_error)
20770  __Pyx_GOTREF(__pyx_t_2);
20771  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20772  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 949, __pyx_L1_error)
20773  __Pyx_GOTREF(__pyx_t_4);
20774  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20775  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_psi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 949, __pyx_L1_error)
20776  __Pyx_GOTREF(__pyx_t_2);
20777  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20778 
20779  /* "ADR.pyx":950
20780  * self.adr.calculateResidual(#element
20781  * self.u[0].femSpace.elementMaps.psi,
20782  * self.u[0].femSpace.elementMaps.grad_psi, # <<<<<<<<<<<<<<
20783  * self.mesh.nodeArray,
20784  * self.mesh.elementNodesArray,
20785  */
20786  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 950, __pyx_L1_error)
20787  __Pyx_GOTREF(__pyx_t_4);
20788  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 950, __pyx_L1_error)
20789  __Pyx_GOTREF(__pyx_t_5);
20790  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20791  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 950, __pyx_L1_error)
20792  __Pyx_GOTREF(__pyx_t_4);
20793  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20794  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 950, __pyx_L1_error)
20795  __Pyx_GOTREF(__pyx_t_5);
20796  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20797  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 950, __pyx_L1_error)
20798  __Pyx_GOTREF(__pyx_t_4);
20799  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20800 
20801  /* "ADR.pyx":951
20802  * self.u[0].femSpace.elementMaps.psi,
20803  * self.u[0].femSpace.elementMaps.grad_psi,
20804  * self.mesh.nodeArray, # <<<<<<<<<<<<<<
20805  * self.mesh.elementNodesArray,
20806  * self.elementQuadratureWeights[('u',0)],
20807  */
20808  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 951, __pyx_L1_error)
20809  __Pyx_GOTREF(__pyx_t_5);
20810  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 951, __pyx_L1_error)
20811  __Pyx_GOTREF(__pyx_t_6);
20812  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20813 
20814  /* "ADR.pyx":952
20815  * self.u[0].femSpace.elementMaps.grad_psi,
20816  * self.mesh.nodeArray,
20817  * self.mesh.elementNodesArray, # <<<<<<<<<<<<<<
20818  * self.elementQuadratureWeights[('u',0)],
20819  * self.u[0].femSpace.psi,
20820  */
20821  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 952, __pyx_L1_error)
20822  __Pyx_GOTREF(__pyx_t_5);
20823  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 952, __pyx_L1_error)
20824  __Pyx_GOTREF(__pyx_t_7);
20825  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20826 
20827  /* "ADR.pyx":953
20828  * self.mesh.nodeArray,
20829  * self.mesh.elementNodesArray,
20830  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
20831  * self.u[0].femSpace.psi,
20832  * self.u[0].femSpace.grad_psi,
20833  */
20834  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 953, __pyx_L1_error)
20835  __Pyx_GOTREF(__pyx_t_5);
20836  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_tuple__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 953, __pyx_L1_error)
20837  __Pyx_GOTREF(__pyx_t_8);
20838  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20839 
20840  /* "ADR.pyx":954
20841  * self.mesh.elementNodesArray,
20842  * self.elementQuadratureWeights[('u',0)],
20843  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
20844  * self.u[0].femSpace.grad_psi,
20845  * self.u[0].femSpace.psi,
20846  */
20847  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 954, __pyx_L1_error)
20848  __Pyx_GOTREF(__pyx_t_5);
20849  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 954, __pyx_L1_error)
20850  __Pyx_GOTREF(__pyx_t_9);
20851  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20852  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 954, __pyx_L1_error)
20853  __Pyx_GOTREF(__pyx_t_5);
20854  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20855  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_psi); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 954, __pyx_L1_error)
20856  __Pyx_GOTREF(__pyx_t_9);
20857  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20858 
20859  /* "ADR.pyx":955
20860  * self.elementQuadratureWeights[('u',0)],
20861  * self.u[0].femSpace.psi,
20862  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
20863  * self.u[0].femSpace.psi,
20864  * self.u[0].femSpace.grad_psi,
20865  */
20866  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 955, __pyx_L1_error)
20867  __Pyx_GOTREF(__pyx_t_5);
20868  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 955, __pyx_L1_error)
20869  __Pyx_GOTREF(__pyx_t_10);
20870  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20871  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 955, __pyx_L1_error)
20872  __Pyx_GOTREF(__pyx_t_5);
20873  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
20874  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 955, __pyx_L1_error)
20875  __Pyx_GOTREF(__pyx_t_10);
20876  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20877 
20878  /* "ADR.pyx":956
20879  * self.u[0].femSpace.psi,
20880  * self.u[0].femSpace.grad_psi,
20881  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
20882  * self.u[0].femSpace.grad_psi,
20883  * self.mesh.elementDiametersArray,
20884  */
20885  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 956, __pyx_L1_error)
20886  __Pyx_GOTREF(__pyx_t_5);
20887  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 956, __pyx_L1_error)
20888  __Pyx_GOTREF(__pyx_t_11);
20889  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20890  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 956, __pyx_L1_error)
20891  __Pyx_GOTREF(__pyx_t_5);
20892  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
20893  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_psi); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 956, __pyx_L1_error)
20894  __Pyx_GOTREF(__pyx_t_11);
20895  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20896 
20897  /* "ADR.pyx":957
20898  * self.u[0].femSpace.grad_psi,
20899  * self.u[0].femSpace.psi,
20900  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
20901  * self.mesh.elementDiametersArray,
20902  * self.q[('cfl',0)],
20903  */
20904  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 957, __pyx_L1_error)
20905  __Pyx_GOTREF(__pyx_t_5);
20906  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 957, __pyx_L1_error)
20907  __Pyx_GOTREF(__pyx_t_12);
20908  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20909  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 957, __pyx_L1_error)
20910  __Pyx_GOTREF(__pyx_t_5);
20911  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
20912  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 957, __pyx_L1_error)
20913  __Pyx_GOTREF(__pyx_t_12);
20914  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20915 
20916  /* "ADR.pyx":958
20917  * self.u[0].femSpace.psi,
20918  * self.u[0].femSpace.grad_psi,
20919  * self.mesh.elementDiametersArray, # <<<<<<<<<<<<<<
20920  * self.q[('cfl',0)],
20921  * self.shockCapturing.shockCapturingFactor,
20922  */
20923  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 958, __pyx_L1_error)
20924  __Pyx_GOTREF(__pyx_t_5);
20925  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 958, __pyx_L1_error)
20926  __Pyx_GOTREF(__pyx_t_13);
20927  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20928 
20929  /* "ADR.pyx":959
20930  * self.u[0].femSpace.grad_psi,
20931  * self.mesh.elementDiametersArray,
20932  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
20933  * self.shockCapturing.shockCapturingFactor,
20934  * self.coefficients.sc_uref,
20935  */
20936  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 959, __pyx_L1_error)
20937  __Pyx_GOTREF(__pyx_t_5);
20938  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_tuple__13); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 959, __pyx_L1_error)
20939  __Pyx_GOTREF(__pyx_t_14);
20940  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20941 
20942  /* "ADR.pyx":960
20943  * self.mesh.elementDiametersArray,
20944  * self.q[('cfl',0)],
20945  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
20946  * self.coefficients.sc_uref,
20947  * self.coefficients.sc_beta,
20948  */
20949  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 960, __pyx_L1_error)
20950  __Pyx_GOTREF(__pyx_t_5);
20951  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 960, __pyx_L1_error)
20952  __Pyx_GOTREF(__pyx_t_15);
20953  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20954 
20955  /* "ADR.pyx":961
20956  * self.q[('cfl',0)],
20957  * self.shockCapturing.shockCapturingFactor,
20958  * self.coefficients.sc_uref, # <<<<<<<<<<<<<<
20959  * self.coefficients.sc_beta,
20960  * self.coefficients.useMetrics,
20961  */
20962  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 961, __pyx_L1_error)
20963  __Pyx_GOTREF(__pyx_t_5);
20964  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sc_uref); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 961, __pyx_L1_error)
20965  __Pyx_GOTREF(__pyx_t_16);
20966  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20967 
20968  /* "ADR.pyx":962
20969  * self.shockCapturing.shockCapturingFactor,
20970  * self.coefficients.sc_uref,
20971  * self.coefficients.sc_beta, # <<<<<<<<<<<<<<
20972  * self.coefficients.useMetrics,
20973  * #element boundary
20974  */
20975  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 962, __pyx_L1_error)
20976  __Pyx_GOTREF(__pyx_t_5);
20977  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sc_beta); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 962, __pyx_L1_error)
20978  __Pyx_GOTREF(__pyx_t_17);
20979  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20980 
20981  /* "ADR.pyx":963
20982  * self.coefficients.sc_uref,
20983  * self.coefficients.sc_beta,
20984  * self.coefficients.useMetrics, # <<<<<<<<<<<<<<
20985  * #element boundary
20986  * self.u[0].femSpace.elementMaps.psi_trace,
20987  */
20988  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 963, __pyx_L1_error)
20989  __Pyx_GOTREF(__pyx_t_5);
20990  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_useMetrics); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 963, __pyx_L1_error)
20991  __Pyx_GOTREF(__pyx_t_18);
20992  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20993 
20994  /* "ADR.pyx":965
20995  * self.coefficients.useMetrics,
20996  * #element boundary
20997  * self.u[0].femSpace.elementMaps.psi_trace, # <<<<<<<<<<<<<<
20998  * self.u[0].femSpace.elementMaps.grad_psi_trace,
20999  * self.elementBoundaryQuadratureWeights[('u',0)],
21000  */
21001  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 965, __pyx_L1_error)
21002  __Pyx_GOTREF(__pyx_t_5);
21003  __pyx_t_19 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 965, __pyx_L1_error)
21004  __Pyx_GOTREF(__pyx_t_19);
21005  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21006  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 965, __pyx_L1_error)
21007  __Pyx_GOTREF(__pyx_t_5);
21008  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21009  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 965, __pyx_L1_error)
21010  __Pyx_GOTREF(__pyx_t_19);
21011  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21012  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 965, __pyx_L1_error)
21013  __Pyx_GOTREF(__pyx_t_5);
21014  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21015 
21016  /* "ADR.pyx":966
21017  * #element boundary
21018  * self.u[0].femSpace.elementMaps.psi_trace,
21019  * self.u[0].femSpace.elementMaps.grad_psi_trace, # <<<<<<<<<<<<<<
21020  * self.elementBoundaryQuadratureWeights[('u',0)],
21021  * self.u[0].femSpace.psi_trace,
21022  */
21023  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 966, __pyx_L1_error)
21024  __Pyx_GOTREF(__pyx_t_19);
21025  __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_19, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 966, __pyx_L1_error)
21026  __Pyx_GOTREF(__pyx_t_20);
21027  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21028  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 966, __pyx_L1_error)
21029  __Pyx_GOTREF(__pyx_t_19);
21030  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21031  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 966, __pyx_L1_error)
21032  __Pyx_GOTREF(__pyx_t_20);
21033  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21034  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 966, __pyx_L1_error)
21035  __Pyx_GOTREF(__pyx_t_19);
21036  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21037 
21038  /* "ADR.pyx":967
21039  * self.u[0].femSpace.elementMaps.psi_trace,
21040  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21041  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
21042  * self.u[0].femSpace.psi_trace,
21043  * self.u[0].femSpace.grad_psi_trace,
21044  */
21045  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 967, __pyx_L1_error)
21046  __Pyx_GOTREF(__pyx_t_20);
21047  __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_t_20, __pyx_tuple__8); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 967, __pyx_L1_error)
21048  __Pyx_GOTREF(__pyx_t_21);
21049  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21050 
21051  /* "ADR.pyx":968
21052  * self.u[0].femSpace.elementMaps.grad_psi_trace,
21053  * self.elementBoundaryQuadratureWeights[('u',0)],
21054  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
21055  * self.u[0].femSpace.grad_psi_trace,
21056  * self.u[0].femSpace.psi_trace,
21057  */
21058  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 968, __pyx_L1_error)
21059  __Pyx_GOTREF(__pyx_t_20);
21060  __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 968, __pyx_L1_error)
21061  __Pyx_GOTREF(__pyx_t_22);
21062  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21063  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 968, __pyx_L1_error)
21064  __Pyx_GOTREF(__pyx_t_20);
21065  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
21066  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 968, __pyx_L1_error)
21067  __Pyx_GOTREF(__pyx_t_22);
21068  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21069 
21070  /* "ADR.pyx":969
21071  * self.elementBoundaryQuadratureWeights[('u',0)],
21072  * self.u[0].femSpace.psi_trace,
21073  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
21074  * self.u[0].femSpace.psi_trace,
21075  * self.u[0].femSpace.grad_psi_trace,
21076  */
21077  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 969, __pyx_L1_error)
21078  __Pyx_GOTREF(__pyx_t_20);
21079  __pyx_t_23 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 969, __pyx_L1_error)
21080  __Pyx_GOTREF(__pyx_t_23);
21081  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21082  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 969, __pyx_L1_error)
21083  __Pyx_GOTREF(__pyx_t_20);
21084  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
21085  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 969, __pyx_L1_error)
21086  __Pyx_GOTREF(__pyx_t_23);
21087  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21088 
21089  /* "ADR.pyx":970
21090  * self.u[0].femSpace.psi_trace,
21091  * self.u[0].femSpace.grad_psi_trace,
21092  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
21093  * self.u[0].femSpace.grad_psi_trace,
21094  * self.u[0].femSpace.elementMaps.boundaryNormals,
21095  */
21096  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 970, __pyx_L1_error)
21097  __Pyx_GOTREF(__pyx_t_20);
21098  __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 970, __pyx_L1_error)
21099  __Pyx_GOTREF(__pyx_t_24);
21100  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21101  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 970, __pyx_L1_error)
21102  __Pyx_GOTREF(__pyx_t_20);
21103  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
21104  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 970, __pyx_L1_error)
21105  __Pyx_GOTREF(__pyx_t_24);
21106  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21107 
21108  /* "ADR.pyx":971
21109  * self.u[0].femSpace.grad_psi_trace,
21110  * self.u[0].femSpace.psi_trace,
21111  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
21112  * self.u[0].femSpace.elementMaps.boundaryNormals,
21113  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21114  */
21115  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 971, __pyx_L1_error)
21116  __Pyx_GOTREF(__pyx_t_20);
21117  __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 971, __pyx_L1_error)
21118  __Pyx_GOTREF(__pyx_t_25);
21119  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21120  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 971, __pyx_L1_error)
21121  __Pyx_GOTREF(__pyx_t_20);
21122  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
21123  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 971, __pyx_L1_error)
21124  __Pyx_GOTREF(__pyx_t_25);
21125  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21126 
21127  /* "ADR.pyx":972
21128  * self.u[0].femSpace.psi_trace,
21129  * self.u[0].femSpace.grad_psi_trace,
21130  * self.u[0].femSpace.elementMaps.boundaryNormals, # <<<<<<<<<<<<<<
21131  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21132  * #physics
21133  */
21134  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 972, __pyx_L1_error)
21135  __Pyx_GOTREF(__pyx_t_20);
21136  __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 972, __pyx_L1_error)
21137  __Pyx_GOTREF(__pyx_t_26);
21138  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21139  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 972, __pyx_L1_error)
21140  __Pyx_GOTREF(__pyx_t_20);
21141  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21142  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 972, __pyx_L1_error)
21143  __Pyx_GOTREF(__pyx_t_26);
21144  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21145  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_boundaryNormals); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 972, __pyx_L1_error)
21146  __Pyx_GOTREF(__pyx_t_20);
21147  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21148 
21149  /* "ADR.pyx":973
21150  * self.u[0].femSpace.grad_psi_trace,
21151  * self.u[0].femSpace.elementMaps.boundaryNormals,
21152  * self.u[0].femSpace.elementMaps.boundaryJacobians, # <<<<<<<<<<<<<<
21153  * #physics
21154  * self.mesh.nElements_global,
21155  */
21156  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 973, __pyx_L1_error)
21157  __Pyx_GOTREF(__pyx_t_26);
21158  __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_26, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 973, __pyx_L1_error)
21159  __Pyx_GOTREF(__pyx_t_27);
21160  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21161  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 973, __pyx_L1_error)
21162  __Pyx_GOTREF(__pyx_t_26);
21163  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21164  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 973, __pyx_L1_error)
21165  __Pyx_GOTREF(__pyx_t_27);
21166  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21167  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_boundaryJacobians); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 973, __pyx_L1_error)
21168  __Pyx_GOTREF(__pyx_t_26);
21169  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21170 
21171  /* "ADR.pyx":975
21172  * self.u[0].femSpace.elementMaps.boundaryJacobians,
21173  * #physics
21174  * self.mesh.nElements_global, # <<<<<<<<<<<<<<
21175  * self.u[0].femSpace.dofMap.l2g,
21176  * self.u[0].dof,
21177  */
21178  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 975, __pyx_L1_error)
21179  __Pyx_GOTREF(__pyx_t_27);
21180  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 975, __pyx_L1_error)
21181  __Pyx_GOTREF(__pyx_t_28);
21182  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21183 
21184  /* "ADR.pyx":976
21185  * #physics
21186  * self.mesh.nElements_global,
21187  * self.u[0].femSpace.dofMap.l2g, # <<<<<<<<<<<<<<
21188  * self.u[0].dof,
21189  * self.coefficients.sdInfo[(0,0)][0],
21190  */
21191  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 976, __pyx_L1_error)
21192  __Pyx_GOTREF(__pyx_t_27);
21193  __pyx_t_29 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 976, __pyx_L1_error)
21194  __Pyx_GOTREF(__pyx_t_29);
21195  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21196  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 976, __pyx_L1_error)
21197  __Pyx_GOTREF(__pyx_t_27);
21198  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21199  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_dofMap); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 976, __pyx_L1_error)
21200  __Pyx_GOTREF(__pyx_t_29);
21201  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21202  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_29, __pyx_n_s_l2g); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 976, __pyx_L1_error)
21203  __Pyx_GOTREF(__pyx_t_27);
21204  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21205 
21206  /* "ADR.pyx":977
21207  * self.mesh.nElements_global,
21208  * self.u[0].femSpace.dofMap.l2g,
21209  * self.u[0].dof, # <<<<<<<<<<<<<<
21210  * self.coefficients.sdInfo[(0,0)][0],
21211  * self.coefficients.sdInfo[(0,0)][1],
21212  */
21213  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 977, __pyx_L1_error)
21214  __Pyx_GOTREF(__pyx_t_29);
21215  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_29, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 977, __pyx_L1_error)
21216  __Pyx_GOTREF(__pyx_t_30);
21217  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21218  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_dof); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 977, __pyx_L1_error)
21219  __Pyx_GOTREF(__pyx_t_29);
21220  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21221 
21222  /* "ADR.pyx":978
21223  * self.u[0].femSpace.dofMap.l2g,
21224  * self.u[0].dof,
21225  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
21226  * self.coefficients.sdInfo[(0,0)][1],
21227  * self.q[('a',0,0)],
21228  */
21229  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 978, __pyx_L1_error)
21230  __Pyx_GOTREF(__pyx_t_30);
21231  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 978, __pyx_L1_error)
21232  __Pyx_GOTREF(__pyx_t_31);
21233  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21234  __pyx_t_30 = __Pyx_PyObject_GetItem(__pyx_t_31, __pyx_tuple__4); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 978, __pyx_L1_error)
21235  __Pyx_GOTREF(__pyx_t_30);
21236  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
21237  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 978, __pyx_L1_error)
21238  __Pyx_GOTREF(__pyx_t_31);
21239  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21240 
21241  /* "ADR.pyx":979
21242  * self.u[0].dof,
21243  * self.coefficients.sdInfo[(0,0)][0],
21244  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
21245  * self.q[('a',0,0)],
21246  * self.q[('df',0,0)],
21247  */
21248  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 979, __pyx_L1_error)
21249  __Pyx_GOTREF(__pyx_t_30);
21250  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 979, __pyx_L1_error)
21251  __Pyx_GOTREF(__pyx_t_32);
21252  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21253  __pyx_t_30 = __Pyx_PyObject_GetItem(__pyx_t_32, __pyx_tuple__4); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 979, __pyx_L1_error)
21254  __Pyx_GOTREF(__pyx_t_30);
21255  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
21256  __pyx_t_32 = __Pyx_GetItemInt(__pyx_t_30, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 979, __pyx_L1_error)
21257  __Pyx_GOTREF(__pyx_t_32);
21258  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21259 
21260  /* "ADR.pyx":980
21261  * self.coefficients.sdInfo[(0,0)][0],
21262  * self.coefficients.sdInfo[(0,0)][1],
21263  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
21264  * self.q[('df',0,0)],
21265  * self.q[('r',0)],
21266  */
21267  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 980, __pyx_L1_error)
21268  __Pyx_GOTREF(__pyx_t_30);
21269  __pyx_t_33 = __Pyx_PyObject_GetItem(__pyx_t_30, __pyx_tuple__10); if (unlikely(!__pyx_t_33)) __PYX_ERR(1, 980, __pyx_L1_error)
21270  __Pyx_GOTREF(__pyx_t_33);
21271  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21272 
21273  /* "ADR.pyx":981
21274  * self.coefficients.sdInfo[(0,0)][1],
21275  * self.q[('a',0,0)],
21276  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
21277  * self.q[('r',0)],
21278  * self.shockCapturing.lag,
21279  */
21280  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 981, __pyx_L1_error)
21281  __Pyx_GOTREF(__pyx_t_30);
21282  __pyx_t_34 = __Pyx_PyObject_GetItem(__pyx_t_30, __pyx_tuple__11); if (unlikely(!__pyx_t_34)) __PYX_ERR(1, 981, __pyx_L1_error)
21283  __Pyx_GOTREF(__pyx_t_34);
21284  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21285 
21286  /* "ADR.pyx":982
21287  * self.q[('a',0,0)],
21288  * self.q[('df',0,0)],
21289  * self.q[('r',0)], # <<<<<<<<<<<<<<
21290  * self.shockCapturing.lag,
21291  * self.shockCapturing.shockCapturingFactor,
21292  */
21293  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 982, __pyx_L1_error)
21294  __Pyx_GOTREF(__pyx_t_30);
21295  __pyx_t_35 = __Pyx_PyObject_GetItem(__pyx_t_30, __pyx_tuple__12); if (unlikely(!__pyx_t_35)) __PYX_ERR(1, 982, __pyx_L1_error)
21296  __Pyx_GOTREF(__pyx_t_35);
21297  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21298 
21299  /* "ADR.pyx":983
21300  * self.q[('df',0,0)],
21301  * self.q[('r',0)],
21302  * self.shockCapturing.lag, # <<<<<<<<<<<<<<
21303  * self.shockCapturing.shockCapturingFactor,
21304  * self.shockCapturing.numDiff[0],
21305  */
21306  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 983, __pyx_L1_error)
21307  __Pyx_GOTREF(__pyx_t_30);
21308  __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_lag); if (unlikely(!__pyx_t_36)) __PYX_ERR(1, 983, __pyx_L1_error)
21309  __Pyx_GOTREF(__pyx_t_36);
21310  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21311 
21312  /* "ADR.pyx":984
21313  * self.q[('r',0)],
21314  * self.shockCapturing.lag,
21315  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
21316  * self.shockCapturing.numDiff[0],
21317  * self.shockCapturing.numDiff_last[0],
21318  */
21319  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 984, __pyx_L1_error)
21320  __Pyx_GOTREF(__pyx_t_30);
21321  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 984, __pyx_L1_error)
21322  __Pyx_GOTREF(__pyx_t_37);
21323  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21324 
21325  /* "ADR.pyx":985
21326  * self.shockCapturing.lag,
21327  * self.shockCapturing.shockCapturingFactor,
21328  * self.shockCapturing.numDiff[0], # <<<<<<<<<<<<<<
21329  * self.shockCapturing.numDiff_last[0],
21330  * self.offset[0],
21331  */
21332  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 985, __pyx_L1_error)
21333  __Pyx_GOTREF(__pyx_t_30);
21334  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 985, __pyx_L1_error)
21335  __Pyx_GOTREF(__pyx_t_38);
21336  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21337  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_38, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 985, __pyx_L1_error)
21338  __Pyx_GOTREF(__pyx_t_30);
21339  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21340 
21341  /* "ADR.pyx":986
21342  * self.shockCapturing.shockCapturingFactor,
21343  * self.shockCapturing.numDiff[0],
21344  * self.shockCapturing.numDiff_last[0], # <<<<<<<<<<<<<<
21345  * self.offset[0],
21346  * self.stride[0],
21347  */
21348  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 986, __pyx_L1_error)
21349  __Pyx_GOTREF(__pyx_t_38);
21350  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_38, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 986, __pyx_L1_error)
21351  __Pyx_GOTREF(__pyx_t_39);
21352  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21353  __pyx_t_38 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 986, __pyx_L1_error)
21354  __Pyx_GOTREF(__pyx_t_38);
21355  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21356 
21357  /* "ADR.pyx":987
21358  * self.shockCapturing.numDiff[0],
21359  * self.shockCapturing.numDiff_last[0],
21360  * self.offset[0], # <<<<<<<<<<<<<<
21361  * self.stride[0],
21362  * r,
21363  */
21364  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 987, __pyx_L1_error)
21365  __Pyx_GOTREF(__pyx_t_39);
21366  __pyx_t_40 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 987, __pyx_L1_error)
21367  __Pyx_GOTREF(__pyx_t_40);
21368  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21369 
21370  /* "ADR.pyx":988
21371  * self.shockCapturing.numDiff_last[0],
21372  * self.offset[0],
21373  * self.stride[0], # <<<<<<<<<<<<<<
21374  * r,
21375  * self.mesh.nExteriorElementBoundaries_global,
21376  */
21377  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stride); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 988, __pyx_L1_error)
21378  __Pyx_GOTREF(__pyx_t_39);
21379  __pyx_t_41 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 988, __pyx_L1_error)
21380  __Pyx_GOTREF(__pyx_t_41);
21381  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21382 
21383  /* "ADR.pyx":990
21384  * self.stride[0],
21385  * r,
21386  * self.mesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
21387  * self.mesh.exteriorElementBoundariesArray,
21388  * self.mesh.elementBoundaryElementsArray,
21389  */
21390  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 990, __pyx_L1_error)
21391  __Pyx_GOTREF(__pyx_t_39);
21392  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 990, __pyx_L1_error)
21393  __Pyx_GOTREF(__pyx_t_42);
21394  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21395 
21396  /* "ADR.pyx":991
21397  * r,
21398  * self.mesh.nExteriorElementBoundaries_global,
21399  * self.mesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
21400  * self.mesh.elementBoundaryElementsArray,
21401  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21402  */
21403  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 991, __pyx_L1_error)
21404  __Pyx_GOTREF(__pyx_t_39);
21405  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 991, __pyx_L1_error)
21406  __Pyx_GOTREF(__pyx_t_43);
21407  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21408 
21409  /* "ADR.pyx":992
21410  * self.mesh.nExteriorElementBoundaries_global,
21411  * self.mesh.exteriorElementBoundariesArray,
21412  * self.mesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
21413  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21414  * self.ebqe[('a',0,0)],
21415  */
21416  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 992, __pyx_L1_error)
21417  __Pyx_GOTREF(__pyx_t_39);
21418  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(1, 992, __pyx_L1_error)
21419  __Pyx_GOTREF(__pyx_t_44);
21420  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21421 
21422  /* "ADR.pyx":993
21423  * self.mesh.exteriorElementBoundariesArray,
21424  * self.mesh.elementBoundaryElementsArray,
21425  * self.mesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
21426  * self.ebqe[('a',0,0)],
21427  * self.ebqe[('df',0,0)],
21428  */
21429  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 993, __pyx_L1_error)
21430  __Pyx_GOTREF(__pyx_t_39);
21431  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_45)) __PYX_ERR(1, 993, __pyx_L1_error)
21432  __Pyx_GOTREF(__pyx_t_45);
21433  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21434 
21435  /* "ADR.pyx":994
21436  * self.mesh.elementBoundaryElementsArray,
21437  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21438  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
21439  * self.ebqe[('df',0,0)],
21440  * self.numericalFlux.isDOFBoundary[0],
21441  */
21442  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 994, __pyx_L1_error)
21443  __Pyx_GOTREF(__pyx_t_39);
21444  __pyx_t_46 = __Pyx_PyObject_GetItem(__pyx_t_39, __pyx_tuple__10); if (unlikely(!__pyx_t_46)) __PYX_ERR(1, 994, __pyx_L1_error)
21445  __Pyx_GOTREF(__pyx_t_46);
21446  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21447 
21448  /* "ADR.pyx":995
21449  * self.mesh.elementBoundaryLocalElementBoundariesArray,
21450  * self.ebqe[('a',0,0)],
21451  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
21452  * self.numericalFlux.isDOFBoundary[0],
21453  * self.numericalFlux.ebqe[('u',0)],
21454  */
21455  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 995, __pyx_L1_error)
21456  __Pyx_GOTREF(__pyx_t_39);
21457  __pyx_t_47 = __Pyx_PyObject_GetItem(__pyx_t_39, __pyx_tuple__11); if (unlikely(!__pyx_t_47)) __PYX_ERR(1, 995, __pyx_L1_error)
21458  __Pyx_GOTREF(__pyx_t_47);
21459  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21460 
21461  /* "ADR.pyx":996
21462  * self.ebqe[('a',0,0)],
21463  * self.ebqe[('df',0,0)],
21464  * self.numericalFlux.isDOFBoundary[0], # <<<<<<<<<<<<<<
21465  * self.numericalFlux.ebqe[('u',0)],
21466  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21467  */
21468  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 996, __pyx_L1_error)
21469  __Pyx_GOTREF(__pyx_t_39);
21470  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_isDOFBoundary); if (unlikely(!__pyx_t_48)) __PYX_ERR(1, 996, __pyx_L1_error)
21471  __Pyx_GOTREF(__pyx_t_48);
21472  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21473  __pyx_t_39 = __Pyx_GetItemInt(__pyx_t_48, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 996, __pyx_L1_error)
21474  __Pyx_GOTREF(__pyx_t_39);
21475  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21476 
21477  /* "ADR.pyx":997
21478  * self.ebqe[('df',0,0)],
21479  * self.numericalFlux.isDOFBoundary[0],
21480  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
21481  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21482  * self.ebqe[('advectiveFlux_bc_flag',0)],
21483  */
21484  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_48)) __PYX_ERR(1, 997, __pyx_L1_error)
21485  __Pyx_GOTREF(__pyx_t_48);
21486  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_t_48, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 997, __pyx_L1_error)
21487  __Pyx_GOTREF(__pyx_t_49);
21488  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21489  __pyx_t_48 = __Pyx_PyObject_GetItem(__pyx_t_49, __pyx_tuple__8); if (unlikely(!__pyx_t_48)) __PYX_ERR(1, 997, __pyx_L1_error)
21490  __Pyx_GOTREF(__pyx_t_48);
21491  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21492 
21493  /* "ADR.pyx":998
21494  * self.numericalFlux.isDOFBoundary[0],
21495  * self.numericalFlux.ebqe[('u',0)],
21496  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
21497  * self.ebqe[('advectiveFlux_bc_flag',0)],
21498  * self.ebqe[('diffusiveFlux_bc',0,0)],
21499  */
21500  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 998, __pyx_L1_error)
21501  __Pyx_GOTREF(__pyx_t_49);
21502  __pyx_t_50 = __Pyx_PyObject_GetItem(__pyx_t_49, __pyx_tuple__15); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 998, __pyx_L1_error)
21503  __Pyx_GOTREF(__pyx_t_50);
21504  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21505 
21506  /* "ADR.pyx":999
21507  * self.numericalFlux.ebqe[('u',0)],
21508  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21509  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
21510  * self.ebqe[('diffusiveFlux_bc',0,0)],
21511  * self.ebqe[('advectiveFlux_bc',0)],
21512  */
21513  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 999, __pyx_L1_error)
21514  __Pyx_GOTREF(__pyx_t_49);
21515  __pyx_t_51 = __Pyx_PyObject_GetItem(__pyx_t_49, __pyx_tuple__17); if (unlikely(!__pyx_t_51)) __PYX_ERR(1, 999, __pyx_L1_error)
21516  __Pyx_GOTREF(__pyx_t_51);
21517  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21518 
21519  /* "ADR.pyx":1000
21520  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
21521  * self.ebqe[('advectiveFlux_bc_flag',0)],
21522  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
21523  * self.ebqe[('advectiveFlux_bc',0)],
21524  * self.ebqe['penalty'],
21525  */
21526  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 1000, __pyx_L1_error)
21527  __Pyx_GOTREF(__pyx_t_49);
21528  __pyx_t_52 = __Pyx_PyObject_GetItem(__pyx_t_49, __pyx_tuple__16); if (unlikely(!__pyx_t_52)) __PYX_ERR(1, 1000, __pyx_L1_error)
21529  __Pyx_GOTREF(__pyx_t_52);
21530  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21531 
21532  /* "ADR.pyx":1001
21533  * self.ebqe[('advectiveFlux_bc_flag',0)],
21534  * self.ebqe[('diffusiveFlux_bc',0,0)],
21535  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
21536  * self.ebqe['penalty'],
21537  * self.numericalFlux.boundaryAdjoint_sigma)
21538  */
21539  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 1001, __pyx_L1_error)
21540  __Pyx_GOTREF(__pyx_t_49);
21541  __pyx_t_53 = __Pyx_PyObject_GetItem(__pyx_t_49, __pyx_tuple__18); if (unlikely(!__pyx_t_53)) __PYX_ERR(1, 1001, __pyx_L1_error)
21542  __Pyx_GOTREF(__pyx_t_53);
21543  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21544 
21545  /* "ADR.pyx":1002
21546  * self.ebqe[('diffusiveFlux_bc',0,0)],
21547  * self.ebqe[('advectiveFlux_bc',0)],
21548  * self.ebqe['penalty'], # <<<<<<<<<<<<<<
21549  * self.numericalFlux.boundaryAdjoint_sigma)
21550  * log("Global residual",level=9,data=r)
21551  */
21552  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 1002, __pyx_L1_error)
21553  __Pyx_GOTREF(__pyx_t_49);
21554  __pyx_t_54 = __Pyx_PyObject_Dict_GetItem(__pyx_t_49, __pyx_n_s_penalty); if (unlikely(!__pyx_t_54)) __PYX_ERR(1, 1002, __pyx_L1_error)
21555  __Pyx_GOTREF(__pyx_t_54);
21556  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21557 
21558  /* "ADR.pyx":1003
21559  * self.ebqe[('advectiveFlux_bc',0)],
21560  * self.ebqe['penalty'],
21561  * self.numericalFlux.boundaryAdjoint_sigma) # <<<<<<<<<<<<<<
21562  * log("Global residual",level=9,data=r)
21563  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
21564  */
21565  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 1003, __pyx_L1_error)
21566  __Pyx_GOTREF(__pyx_t_49);
21567  __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_t_49, __pyx_n_s_boundaryAdjoint_sigma); if (unlikely(!__pyx_t_55)) __PYX_ERR(1, 1003, __pyx_L1_error)
21568  __Pyx_GOTREF(__pyx_t_55);
21569  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
21570  __pyx_t_49 = NULL;
21571  __pyx_t_56 = 0;
21572  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
21573  __pyx_t_49 = PyMethod_GET_SELF(__pyx_t_3);
21574  if (likely(__pyx_t_49)) {
21575  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21576  __Pyx_INCREF(__pyx_t_49);
21577  __Pyx_INCREF(function);
21578  __Pyx_DECREF_SET(__pyx_t_3, function);
21579  __pyx_t_56 = 1;
21580  }
21581  }
21582  #if CYTHON_FAST_PYCALL
21583  if (PyFunction_Check(__pyx_t_3)) {
21584  PyObject *__pyx_temp[54] = {__pyx_t_49, __pyx_t_2, __pyx_t_4, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_5, __pyx_t_19, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_20, __pyx_t_26, __pyx_t_28, __pyx_t_27, __pyx_t_29, __pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_30, __pyx_t_38, __pyx_t_40, __pyx_t_41, __pyx_v_r, __pyx_t_42, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_39, __pyx_t_48, __pyx_t_50, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55};
21585  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_56, 53+__pyx_t_56); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 948, __pyx_L1_error)
21586  __Pyx_XDECREF(__pyx_t_49); __pyx_t_49 = 0;
21587  __Pyx_GOTREF(__pyx_t_1);
21588  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21589  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21590  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21591  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
21592  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21593  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21594  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21595  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
21596  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
21597  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
21598  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
21599  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
21600  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
21601  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
21602  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
21603  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21604  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21605  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
21606  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
21607  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
21608  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
21609  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
21610  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21611  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21612  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
21613  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21614  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21615  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
21616  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
21617  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
21618  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
21619  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
21620  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
21621  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
21622  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21623  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21624  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
21625  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
21626  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
21627  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
21628  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
21629  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
21630  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
21631  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
21632  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21633  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21634  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
21635  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
21636  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
21637  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
21638  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
21639  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
21640  } else
21641  #endif
21642  #if CYTHON_FAST_PYCCALL
21643  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
21644  PyObject *__pyx_temp[54] = {__pyx_t_49, __pyx_t_2, __pyx_t_4, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_5, __pyx_t_19, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_20, __pyx_t_26, __pyx_t_28, __pyx_t_27, __pyx_t_29, __pyx_t_31, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_30, __pyx_t_38, __pyx_t_40, __pyx_t_41, __pyx_v_r, __pyx_t_42, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_39, __pyx_t_48, __pyx_t_50, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55};
21645  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_56, 53+__pyx_t_56); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 948, __pyx_L1_error)
21646  __Pyx_XDECREF(__pyx_t_49); __pyx_t_49 = 0;
21647  __Pyx_GOTREF(__pyx_t_1);
21648  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21649  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21650  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21651  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
21652  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21653  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21654  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21655  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
21656  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
21657  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
21658  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
21659  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
21660  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
21661  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
21662  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
21663  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21664  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
21665  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
21666  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
21667  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
21668  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
21669  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
21670  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
21671  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
21672  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
21673  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
21674  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
21675  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
21676  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
21677  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
21678  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
21679  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
21680  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
21681  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
21682  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
21683  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
21684  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
21685  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
21686  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
21687  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
21688  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
21689  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
21690  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
21691  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
21692  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
21693  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
21694  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
21695  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
21696  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
21697  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
21698  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
21699  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
21700  } else
21701  #endif
21702  {
21703  __pyx_t_57 = PyTuple_New(53+__pyx_t_56); if (unlikely(!__pyx_t_57)) __PYX_ERR(1, 948, __pyx_L1_error)
21704  __Pyx_GOTREF(__pyx_t_57);
21705  if (__pyx_t_49) {
21706  __Pyx_GIVEREF(__pyx_t_49); PyTuple_SET_ITEM(__pyx_t_57, 0, __pyx_t_49); __pyx_t_49 = NULL;
21707  }
21708  __Pyx_GIVEREF(__pyx_t_2);
21709  PyTuple_SET_ITEM(__pyx_t_57, 0+__pyx_t_56, __pyx_t_2);
21710  __Pyx_GIVEREF(__pyx_t_4);
21711  PyTuple_SET_ITEM(__pyx_t_57, 1+__pyx_t_56, __pyx_t_4);
21712  __Pyx_GIVEREF(__pyx_t_6);
21713  PyTuple_SET_ITEM(__pyx_t_57, 2+__pyx_t_56, __pyx_t_6);
21714  __Pyx_GIVEREF(__pyx_t_7);
21715  PyTuple_SET_ITEM(__pyx_t_57, 3+__pyx_t_56, __pyx_t_7);
21716  __Pyx_GIVEREF(__pyx_t_8);
21717  PyTuple_SET_ITEM(__pyx_t_57, 4+__pyx_t_56, __pyx_t_8);
21718  __Pyx_GIVEREF(__pyx_t_9);
21719  PyTuple_SET_ITEM(__pyx_t_57, 5+__pyx_t_56, __pyx_t_9);
21720  __Pyx_GIVEREF(__pyx_t_10);
21721  PyTuple_SET_ITEM(__pyx_t_57, 6+__pyx_t_56, __pyx_t_10);
21722  __Pyx_GIVEREF(__pyx_t_11);
21723  PyTuple_SET_ITEM(__pyx_t_57, 7+__pyx_t_56, __pyx_t_11);
21724  __Pyx_GIVEREF(__pyx_t_12);
21725  PyTuple_SET_ITEM(__pyx_t_57, 8+__pyx_t_56, __pyx_t_12);
21726  __Pyx_GIVEREF(__pyx_t_13);
21727  PyTuple_SET_ITEM(__pyx_t_57, 9+__pyx_t_56, __pyx_t_13);
21728  __Pyx_GIVEREF(__pyx_t_14);
21729  PyTuple_SET_ITEM(__pyx_t_57, 10+__pyx_t_56, __pyx_t_14);
21730  __Pyx_GIVEREF(__pyx_t_15);
21731  PyTuple_SET_ITEM(__pyx_t_57, 11+__pyx_t_56, __pyx_t_15);
21732  __Pyx_GIVEREF(__pyx_t_16);
21733  PyTuple_SET_ITEM(__pyx_t_57, 12+__pyx_t_56, __pyx_t_16);
21734  __Pyx_GIVEREF(__pyx_t_17);
21735  PyTuple_SET_ITEM(__pyx_t_57, 13+__pyx_t_56, __pyx_t_17);
21736  __Pyx_GIVEREF(__pyx_t_18);
21737  PyTuple_SET_ITEM(__pyx_t_57, 14+__pyx_t_56, __pyx_t_18);
21738  __Pyx_GIVEREF(__pyx_t_5);
21739  PyTuple_SET_ITEM(__pyx_t_57, 15+__pyx_t_56, __pyx_t_5);
21740  __Pyx_GIVEREF(__pyx_t_19);
21741  PyTuple_SET_ITEM(__pyx_t_57, 16+__pyx_t_56, __pyx_t_19);
21742  __Pyx_GIVEREF(__pyx_t_21);
21743  PyTuple_SET_ITEM(__pyx_t_57, 17+__pyx_t_56, __pyx_t_21);
21744  __Pyx_GIVEREF(__pyx_t_22);
21745  PyTuple_SET_ITEM(__pyx_t_57, 18+__pyx_t_56, __pyx_t_22);
21746  __Pyx_GIVEREF(__pyx_t_23);
21747  PyTuple_SET_ITEM(__pyx_t_57, 19+__pyx_t_56, __pyx_t_23);
21748  __Pyx_GIVEREF(__pyx_t_24);
21749  PyTuple_SET_ITEM(__pyx_t_57, 20+__pyx_t_56, __pyx_t_24);
21750  __Pyx_GIVEREF(__pyx_t_25);
21751  PyTuple_SET_ITEM(__pyx_t_57, 21+__pyx_t_56, __pyx_t_25);
21752  __Pyx_GIVEREF(__pyx_t_20);
21753  PyTuple_SET_ITEM(__pyx_t_57, 22+__pyx_t_56, __pyx_t_20);
21754  __Pyx_GIVEREF(__pyx_t_26);
21755  PyTuple_SET_ITEM(__pyx_t_57, 23+__pyx_t_56, __pyx_t_26);
21756  __Pyx_GIVEREF(__pyx_t_28);
21757  PyTuple_SET_ITEM(__pyx_t_57, 24+__pyx_t_56, __pyx_t_28);
21758  __Pyx_GIVEREF(__pyx_t_27);
21759  PyTuple_SET_ITEM(__pyx_t_57, 25+__pyx_t_56, __pyx_t_27);
21760  __Pyx_GIVEREF(__pyx_t_29);
21761  PyTuple_SET_ITEM(__pyx_t_57, 26+__pyx_t_56, __pyx_t_29);
21762  __Pyx_GIVEREF(__pyx_t_31);
21763  PyTuple_SET_ITEM(__pyx_t_57, 27+__pyx_t_56, __pyx_t_31);
21764  __Pyx_GIVEREF(__pyx_t_32);
21765  PyTuple_SET_ITEM(__pyx_t_57, 28+__pyx_t_56, __pyx_t_32);
21766  __Pyx_GIVEREF(__pyx_t_33);
21767  PyTuple_SET_ITEM(__pyx_t_57, 29+__pyx_t_56, __pyx_t_33);
21768  __Pyx_GIVEREF(__pyx_t_34);
21769  PyTuple_SET_ITEM(__pyx_t_57, 30+__pyx_t_56, __pyx_t_34);
21770  __Pyx_GIVEREF(__pyx_t_35);
21771  PyTuple_SET_ITEM(__pyx_t_57, 31+__pyx_t_56, __pyx_t_35);
21772  __Pyx_GIVEREF(__pyx_t_36);
21773  PyTuple_SET_ITEM(__pyx_t_57, 32+__pyx_t_56, __pyx_t_36);
21774  __Pyx_GIVEREF(__pyx_t_37);
21775  PyTuple_SET_ITEM(__pyx_t_57, 33+__pyx_t_56, __pyx_t_37);
21776  __Pyx_GIVEREF(__pyx_t_30);
21777  PyTuple_SET_ITEM(__pyx_t_57, 34+__pyx_t_56, __pyx_t_30);
21778  __Pyx_GIVEREF(__pyx_t_38);
21779  PyTuple_SET_ITEM(__pyx_t_57, 35+__pyx_t_56, __pyx_t_38);
21780  __Pyx_GIVEREF(__pyx_t_40);
21781  PyTuple_SET_ITEM(__pyx_t_57, 36+__pyx_t_56, __pyx_t_40);
21782  __Pyx_GIVEREF(__pyx_t_41);
21783  PyTuple_SET_ITEM(__pyx_t_57, 37+__pyx_t_56, __pyx_t_41);
21784  __Pyx_INCREF(__pyx_v_r);
21785  __Pyx_GIVEREF(__pyx_v_r);
21786  PyTuple_SET_ITEM(__pyx_t_57, 38+__pyx_t_56, __pyx_v_r);
21787  __Pyx_GIVEREF(__pyx_t_42);
21788  PyTuple_SET_ITEM(__pyx_t_57, 39+__pyx_t_56, __pyx_t_42);
21789  __Pyx_GIVEREF(__pyx_t_43);
21790  PyTuple_SET_ITEM(__pyx_t_57, 40+__pyx_t_56, __pyx_t_43);
21791  __Pyx_GIVEREF(__pyx_t_44);
21792  PyTuple_SET_ITEM(__pyx_t_57, 41+__pyx_t_56, __pyx_t_44);
21793  __Pyx_GIVEREF(__pyx_t_45);
21794  PyTuple_SET_ITEM(__pyx_t_57, 42+__pyx_t_56, __pyx_t_45);
21795  __Pyx_GIVEREF(__pyx_t_46);
21796  PyTuple_SET_ITEM(__pyx_t_57, 43+__pyx_t_56, __pyx_t_46);
21797  __Pyx_GIVEREF(__pyx_t_47);
21798  PyTuple_SET_ITEM(__pyx_t_57, 44+__pyx_t_56, __pyx_t_47);
21799  __Pyx_GIVEREF(__pyx_t_39);
21800  PyTuple_SET_ITEM(__pyx_t_57, 45+__pyx_t_56, __pyx_t_39);
21801  __Pyx_GIVEREF(__pyx_t_48);
21802  PyTuple_SET_ITEM(__pyx_t_57, 46+__pyx_t_56, __pyx_t_48);
21803  __Pyx_GIVEREF(__pyx_t_50);
21804  PyTuple_SET_ITEM(__pyx_t_57, 47+__pyx_t_56, __pyx_t_50);
21805  __Pyx_GIVEREF(__pyx_t_51);
21806  PyTuple_SET_ITEM(__pyx_t_57, 48+__pyx_t_56, __pyx_t_51);
21807  __Pyx_GIVEREF(__pyx_t_52);
21808  PyTuple_SET_ITEM(__pyx_t_57, 49+__pyx_t_56, __pyx_t_52);
21809  __Pyx_GIVEREF(__pyx_t_53);
21810  PyTuple_SET_ITEM(__pyx_t_57, 50+__pyx_t_56, __pyx_t_53);
21811  __Pyx_GIVEREF(__pyx_t_54);
21812  PyTuple_SET_ITEM(__pyx_t_57, 51+__pyx_t_56, __pyx_t_54);
21813  __Pyx_GIVEREF(__pyx_t_55);
21814  PyTuple_SET_ITEM(__pyx_t_57, 52+__pyx_t_56, __pyx_t_55);
21815  __pyx_t_2 = 0;
21816  __pyx_t_4 = 0;
21817  __pyx_t_6 = 0;
21818  __pyx_t_7 = 0;
21819  __pyx_t_8 = 0;
21820  __pyx_t_9 = 0;
21821  __pyx_t_10 = 0;
21822  __pyx_t_11 = 0;
21823  __pyx_t_12 = 0;
21824  __pyx_t_13 = 0;
21825  __pyx_t_14 = 0;
21826  __pyx_t_15 = 0;
21827  __pyx_t_16 = 0;
21828  __pyx_t_17 = 0;
21829  __pyx_t_18 = 0;
21830  __pyx_t_5 = 0;
21831  __pyx_t_19 = 0;
21832  __pyx_t_21 = 0;
21833  __pyx_t_22 = 0;
21834  __pyx_t_23 = 0;
21835  __pyx_t_24 = 0;
21836  __pyx_t_25 = 0;
21837  __pyx_t_20 = 0;
21838  __pyx_t_26 = 0;
21839  __pyx_t_28 = 0;
21840  __pyx_t_27 = 0;
21841  __pyx_t_29 = 0;
21842  __pyx_t_31 = 0;
21843  __pyx_t_32 = 0;
21844  __pyx_t_33 = 0;
21845  __pyx_t_34 = 0;
21846  __pyx_t_35 = 0;
21847  __pyx_t_36 = 0;
21848  __pyx_t_37 = 0;
21849  __pyx_t_30 = 0;
21850  __pyx_t_38 = 0;
21851  __pyx_t_40 = 0;
21852  __pyx_t_41 = 0;
21853  __pyx_t_42 = 0;
21854  __pyx_t_43 = 0;
21855  __pyx_t_44 = 0;
21856  __pyx_t_45 = 0;
21857  __pyx_t_46 = 0;
21858  __pyx_t_47 = 0;
21859  __pyx_t_39 = 0;
21860  __pyx_t_48 = 0;
21861  __pyx_t_50 = 0;
21862  __pyx_t_51 = 0;
21863  __pyx_t_52 = 0;
21864  __pyx_t_53 = 0;
21865  __pyx_t_54 = 0;
21866  __pyx_t_55 = 0;
21867  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 948, __pyx_L1_error)
21868  __Pyx_GOTREF(__pyx_t_1);
21869  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
21870  }
21871  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21872  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21873 
21874  /* "ADR.pyx":1004
21875  * self.ebqe['penalty'],
21876  * self.numericalFlux.boundaryAdjoint_sigma)
21877  * log("Global residual",level=9,data=r) # <<<<<<<<<<<<<<
21878  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
21879  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
21880  */
21881  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1004, __pyx_L1_error)
21882  __Pyx_GOTREF(__pyx_t_1);
21883  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1004, __pyx_L1_error)
21884  __Pyx_GOTREF(__pyx_t_3);
21885  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_level, __pyx_int_9) < 0) __PYX_ERR(1, 1004, __pyx_L1_error)
21886  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_data, __pyx_v_r) < 0) __PYX_ERR(1, 1004, __pyx_L1_error)
21887  __pyx_t_57 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__28, __pyx_t_3); if (unlikely(!__pyx_t_57)) __PYX_ERR(1, 1004, __pyx_L1_error)
21888  __Pyx_GOTREF(__pyx_t_57);
21889  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21890  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21891  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
21892 
21893  /* "ADR.pyx":1005
21894  * self.numericalFlux.boundaryAdjoint_sigma)
21895  * log("Global residual",level=9,data=r)
21896  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned]))) # <<<<<<<<<<<<<<
21897  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
21898  * self.nonlinear_function_evaluations += 1
21899  */
21900  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fabs); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1005, __pyx_L1_error)
21901  __Pyx_GOTREF(__pyx_t_3);
21902  __Pyx_GetModuleGlobalName(__pyx_t_55, __pyx_n_s_globalSum); if (unlikely(!__pyx_t_55)) __PYX_ERR(1, 1005, __pyx_L1_error)
21903  __Pyx_GOTREF(__pyx_t_55);
21904  __pyx_t_54 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_flat); if (unlikely(!__pyx_t_54)) __PYX_ERR(1, 1005, __pyx_L1_error)
21905  __Pyx_GOTREF(__pyx_t_54);
21906  __pyx_t_53 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_53)) __PYX_ERR(1, 1005, __pyx_L1_error)
21907  __Pyx_GOTREF(__pyx_t_53);
21908  __pyx_t_52 = __Pyx_PyObject_GetAttrStr(__pyx_t_53, __pyx_n_s_nElements_owned); if (unlikely(!__pyx_t_52)) __PYX_ERR(1, 1005, __pyx_L1_error)
21909  __Pyx_GOTREF(__pyx_t_52);
21910  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
21911  __pyx_t_53 = __Pyx_PyObject_GetSlice(__pyx_t_54, 0, 0, NULL, &__pyx_t_52, NULL, 0, 0, 1); if (unlikely(!__pyx_t_53)) __PYX_ERR(1, 1005, __pyx_L1_error)
21912  __Pyx_GOTREF(__pyx_t_53);
21913  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
21914  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
21915  __pyx_t_52 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_53); if (unlikely(!__pyx_t_52)) __PYX_ERR(1, 1005, __pyx_L1_error)
21916  __Pyx_GOTREF(__pyx_t_52);
21917  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
21918  __pyx_t_53 = NULL;
21919  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_55))) {
21920  __pyx_t_53 = PyMethod_GET_SELF(__pyx_t_55);
21921  if (likely(__pyx_t_53)) {
21922  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_55);
21923  __Pyx_INCREF(__pyx_t_53);
21924  __Pyx_INCREF(function);
21925  __Pyx_DECREF_SET(__pyx_t_55, function);
21926  }
21927  }
21928  __pyx_t_1 = (__pyx_t_53) ? __Pyx_PyObject_Call2Args(__pyx_t_55, __pyx_t_53, __pyx_t_52) : __Pyx_PyObject_CallOneArg(__pyx_t_55, __pyx_t_52);
21929  __Pyx_XDECREF(__pyx_t_53); __pyx_t_53 = 0;
21930  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
21931  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1005, __pyx_L1_error)
21932  __Pyx_GOTREF(__pyx_t_1);
21933  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
21934  __pyx_t_55 = NULL;
21935  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
21936  __pyx_t_55 = PyMethod_GET_SELF(__pyx_t_3);
21937  if (likely(__pyx_t_55)) {
21938  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21939  __Pyx_INCREF(__pyx_t_55);
21940  __Pyx_INCREF(function);
21941  __Pyx_DECREF_SET(__pyx_t_3, function);
21942  }
21943  }
21944  __pyx_t_57 = (__pyx_t_55) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_55, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);
21945  __Pyx_XDECREF(__pyx_t_55); __pyx_t_55 = 0;
21946  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21947  if (unlikely(!__pyx_t_57)) __PYX_ERR(1, 1005, __pyx_L1_error)
21948  __Pyx_GOTREF(__pyx_t_57);
21949  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21950  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1005, __pyx_L1_error)
21951  __Pyx_GOTREF(__pyx_t_3);
21952  if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_n_s_massConservationError, __pyx_t_57) < 0) __PYX_ERR(1, 1005, __pyx_L1_error)
21953  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
21954  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21955 
21956  /* "ADR.pyx":1006
21957  * log("Global residual",level=9,data=r)
21958  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
21959  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError) # <<<<<<<<<<<<<<
21960  * self.nonlinear_function_evaluations += 1
21961  * def getJacobian(self,jacobian):
21962  */
21963  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1006, __pyx_L1_error)
21964  __Pyx_GOTREF(__pyx_t_3);
21965  __pyx_t_57 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_57)) __PYX_ERR(1, 1006, __pyx_L1_error)
21966  __Pyx_GOTREF(__pyx_t_57);
21967  if (PyDict_SetItem(__pyx_t_57, __pyx_n_s_level, __pyx_int_3) < 0) __PYX_ERR(1, 1006, __pyx_L1_error)
21968  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1006, __pyx_L1_error)
21969  __Pyx_GOTREF(__pyx_t_1);
21970  __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_massConservationError); if (unlikely(!__pyx_t_55)) __PYX_ERR(1, 1006, __pyx_L1_error)
21971  __Pyx_GOTREF(__pyx_t_55);
21972  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21973  if (PyDict_SetItem(__pyx_t_57, __pyx_n_s_data, __pyx_t_55) < 0) __PYX_ERR(1, 1006, __pyx_L1_error)
21974  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
21975  __pyx_t_55 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__29, __pyx_t_57); if (unlikely(!__pyx_t_55)) __PYX_ERR(1, 1006, __pyx_L1_error)
21976  __Pyx_GOTREF(__pyx_t_55);
21977  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21978  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
21979  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
21980 
21981  /* "ADR.pyx":1007
21982  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
21983  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
21984  * self.nonlinear_function_evaluations += 1 # <<<<<<<<<<<<<<
21985  * def getJacobian(self,jacobian):
21986  * #import superluWrappers
21987  */
21988  __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_evaluations); if (unlikely(!__pyx_t_55)) __PYX_ERR(1, 1007, __pyx_L1_error)
21989  __Pyx_GOTREF(__pyx_t_55);
21990  __pyx_t_57 = __Pyx_PyInt_AddObjC(__pyx_t_55, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_57)) __PYX_ERR(1, 1007, __pyx_L1_error)
21991  __Pyx_GOTREF(__pyx_t_57);
21992  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
21993  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_evaluations, __pyx_t_57) < 0) __PYX_ERR(1, 1007, __pyx_L1_error)
21994  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
21995 
21996  /* "ADR.pyx":936
21997  * def calculateCoefficients(self):
21998  * pass
21999  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
22000  * import pdb
22001  * import copy
22002  */
22003 
22004  /* function exit code */
22005  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22006  goto __pyx_L0;
22007  __pyx_L1_error:;
22008  __Pyx_XDECREF(__pyx_t_1);
22009  __Pyx_XDECREF(__pyx_t_2);
22010  __Pyx_XDECREF(__pyx_t_3);
22011  __Pyx_XDECREF(__pyx_t_4);
22012  __Pyx_XDECREF(__pyx_t_5);
22013  __Pyx_XDECREF(__pyx_t_6);
22014  __Pyx_XDECREF(__pyx_t_7);
22015  __Pyx_XDECREF(__pyx_t_8);
22016  __Pyx_XDECREF(__pyx_t_9);
22017  __Pyx_XDECREF(__pyx_t_10);
22018  __Pyx_XDECREF(__pyx_t_11);
22019  __Pyx_XDECREF(__pyx_t_12);
22020  __Pyx_XDECREF(__pyx_t_13);
22021  __Pyx_XDECREF(__pyx_t_14);
22022  __Pyx_XDECREF(__pyx_t_15);
22023  __Pyx_XDECREF(__pyx_t_16);
22024  __Pyx_XDECREF(__pyx_t_17);
22025  __Pyx_XDECREF(__pyx_t_18);
22026  __Pyx_XDECREF(__pyx_t_19);
22027  __Pyx_XDECREF(__pyx_t_20);
22028  __Pyx_XDECREF(__pyx_t_21);
22029  __Pyx_XDECREF(__pyx_t_22);
22030  __Pyx_XDECREF(__pyx_t_23);
22031  __Pyx_XDECREF(__pyx_t_24);
22032  __Pyx_XDECREF(__pyx_t_25);
22033  __Pyx_XDECREF(__pyx_t_26);
22034  __Pyx_XDECREF(__pyx_t_27);
22035  __Pyx_XDECREF(__pyx_t_28);
22036  __Pyx_XDECREF(__pyx_t_29);
22037  __Pyx_XDECREF(__pyx_t_30);
22038  __Pyx_XDECREF(__pyx_t_31);
22039  __Pyx_XDECREF(__pyx_t_32);
22040  __Pyx_XDECREF(__pyx_t_33);
22041  __Pyx_XDECREF(__pyx_t_34);
22042  __Pyx_XDECREF(__pyx_t_35);
22043  __Pyx_XDECREF(__pyx_t_36);
22044  __Pyx_XDECREF(__pyx_t_37);
22045  __Pyx_XDECREF(__pyx_t_38);
22046  __Pyx_XDECREF(__pyx_t_39);
22047  __Pyx_XDECREF(__pyx_t_40);
22048  __Pyx_XDECREF(__pyx_t_41);
22049  __Pyx_XDECREF(__pyx_t_42);
22050  __Pyx_XDECREF(__pyx_t_43);
22051  __Pyx_XDECREF(__pyx_t_44);
22052  __Pyx_XDECREF(__pyx_t_45);
22053  __Pyx_XDECREF(__pyx_t_46);
22054  __Pyx_XDECREF(__pyx_t_47);
22055  __Pyx_XDECREF(__pyx_t_48);
22056  __Pyx_XDECREF(__pyx_t_49);
22057  __Pyx_XDECREF(__pyx_t_50);
22058  __Pyx_XDECREF(__pyx_t_51);
22059  __Pyx_XDECREF(__pyx_t_52);
22060  __Pyx_XDECREF(__pyx_t_53);
22061  __Pyx_XDECREF(__pyx_t_54);
22062  __Pyx_XDECREF(__pyx_t_55);
22063  __Pyx_XDECREF(__pyx_t_57);
22064  __Pyx_AddTraceback("ADR.LevelModel.getResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
22065  __pyx_r = NULL;
22066  __pyx_L0:;
22067  __Pyx_XDECREF(__pyx_v_pdb);
22068  __Pyx_XDECREF(__pyx_v_copy);
22069  __Pyx_XGIVEREF(__pyx_r);
22070  __Pyx_RefNannyFinishContext();
22071  return __pyx_r;
22072 }
22073 
22074 /* "ADR.pyx":1008
22075  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
22076  * self.nonlinear_function_evaluations += 1
22077  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
22078  * #import superluWrappers
22079  * #import numpy
22080  */
22081 
22082 /* Python wrapper */
22083 static PyObject *__pyx_pw_3ADR_10LevelModel_7getJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22084 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_7getJacobian = {"getJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_10LevelModel_7getJacobian, METH_VARARGS|METH_KEYWORDS, 0};
22085 static PyObject *__pyx_pw_3ADR_10LevelModel_7getJacobian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22086  PyObject *__pyx_v_self = 0;
22087  PyObject *__pyx_v_jacobian = 0;
22088  PyObject *__pyx_r = 0;
22089  __Pyx_RefNannyDeclarations
22090  __Pyx_RefNannySetupContext("getJacobian (wrapper)", 0);
22091  {
22092  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_jacobian,0};
22093  PyObject* values[2] = {0,0};
22094  if (unlikely(__pyx_kwds)) {
22095  Py_ssize_t kw_args;
22096  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22097  switch (pos_args) {
22098  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22099  CYTHON_FALLTHROUGH;
22100  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22101  CYTHON_FALLTHROUGH;
22102  case 0: break;
22103  default: goto __pyx_L5_argtuple_error;
22104  }
22105  kw_args = PyDict_Size(__pyx_kwds);
22106  switch (pos_args) {
22107  case 0:
22108  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
22109  else goto __pyx_L5_argtuple_error;
22110  CYTHON_FALLTHROUGH;
22111  case 1:
22112  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_jacobian)) != 0)) kw_args--;
22113  else {
22114  __Pyx_RaiseArgtupleInvalid("getJacobian", 1, 2, 2, 1); __PYX_ERR(1, 1008, __pyx_L3_error)
22115  }
22116  }
22117  if (unlikely(kw_args > 0)) {
22118  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getJacobian") < 0)) __PYX_ERR(1, 1008, __pyx_L3_error)
22119  }
22120  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22121  goto __pyx_L5_argtuple_error;
22122  } else {
22123  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22124  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22125  }
22126  __pyx_v_self = values[0];
22127  __pyx_v_jacobian = values[1];
22128  }
22129  goto __pyx_L4_argument_unpacking_done;
22130  __pyx_L5_argtuple_error:;
22131  __Pyx_RaiseArgtupleInvalid("getJacobian", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1008, __pyx_L3_error)
22132  __pyx_L3_error:;
22133  __Pyx_AddTraceback("ADR.LevelModel.getJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
22134  __Pyx_RefNannyFinishContext();
22135  return NULL;
22136  __pyx_L4_argument_unpacking_done:;
22137  __pyx_r = __pyx_pf_3ADR_10LevelModel_6getJacobian(__pyx_self, __pyx_v_self, __pyx_v_jacobian);
22138 
22139  /* function exit code */
22140  __Pyx_RefNannyFinishContext();
22141  return __pyx_r;
22142 }
22143 
22144 static PyObject *__pyx_pf_3ADR_10LevelModel_6getJacobian(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_jacobian) {
22145  CYTHON_UNUSED PyObject *__pyx_v_pdb = NULL;
22146  PyObject *__pyx_r = NULL;
22147  __Pyx_RefNannyDeclarations
22148  PyObject *__pyx_t_1 = NULL;
22149  PyObject *__pyx_t_2 = NULL;
22150  PyObject *__pyx_t_3 = NULL;
22151  PyObject *__pyx_t_4 = NULL;
22152  int __pyx_t_5;
22153  PyObject *__pyx_t_6 = NULL;
22154  PyObject *__pyx_t_7 = NULL;
22155  PyObject *__pyx_t_8 = NULL;
22156  PyObject *__pyx_t_9 = NULL;
22157  PyObject *__pyx_t_10 = NULL;
22158  PyObject *__pyx_t_11 = NULL;
22159  PyObject *__pyx_t_12 = NULL;
22160  PyObject *__pyx_t_13 = NULL;
22161  PyObject *__pyx_t_14 = NULL;
22162  PyObject *__pyx_t_15 = NULL;
22163  PyObject *__pyx_t_16 = NULL;
22164  PyObject *__pyx_t_17 = NULL;
22165  PyObject *__pyx_t_18 = NULL;
22166  PyObject *__pyx_t_19 = NULL;
22167  PyObject *__pyx_t_20 = NULL;
22168  PyObject *__pyx_t_21 = NULL;
22169  PyObject *__pyx_t_22 = NULL;
22170  PyObject *__pyx_t_23 = NULL;
22171  PyObject *__pyx_t_24 = NULL;
22172  PyObject *__pyx_t_25 = NULL;
22173  PyObject *__pyx_t_26 = NULL;
22174  PyObject *__pyx_t_27 = NULL;
22175  PyObject *__pyx_t_28 = NULL;
22176  PyObject *__pyx_t_29 = NULL;
22177  PyObject *__pyx_t_30 = NULL;
22178  PyObject *__pyx_t_31 = NULL;
22179  PyObject *__pyx_t_32 = NULL;
22180  PyObject *__pyx_t_33 = NULL;
22181  PyObject *__pyx_t_34 = NULL;
22182  PyObject *__pyx_t_35 = NULL;
22183  PyObject *__pyx_t_36 = NULL;
22184  PyObject *__pyx_t_37 = NULL;
22185  PyObject *__pyx_t_38 = NULL;
22186  PyObject *__pyx_t_39 = NULL;
22187  PyObject *__pyx_t_40 = NULL;
22188  PyObject *__pyx_t_41 = NULL;
22189  PyObject *__pyx_t_42 = NULL;
22190  PyObject *__pyx_t_43 = NULL;
22191  PyObject *__pyx_t_44 = NULL;
22192  PyObject *__pyx_t_45 = NULL;
22193  PyObject *__pyx_t_46 = NULL;
22194  PyObject *__pyx_t_47 = NULL;
22195  PyObject *__pyx_t_48 = NULL;
22196  PyObject *__pyx_t_49 = NULL;
22197  PyObject *__pyx_t_50 = NULL;
22198  PyObject *__pyx_t_51 = NULL;
22199  PyObject *__pyx_t_52 = NULL;
22200  PyObject *__pyx_t_53 = NULL;
22201  PyObject *__pyx_t_54 = NULL;
22202  PyObject *__pyx_t_55 = NULL;
22203  PyObject *__pyx_t_56 = NULL;
22204  PyObject *__pyx_t_57 = NULL;
22205  PyObject *__pyx_t_58 = NULL;
22206  __Pyx_RefNannySetupContext("getJacobian", 0);
22207 
22208  /* "ADR.pyx":1011
22209  * #import superluWrappers
22210  * #import numpy
22211  * import pdb # <<<<<<<<<<<<<<
22212  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22213  * self.adr.calculateJacobian(#element
22214  */
22215  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pdb, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1011, __pyx_L1_error)
22216  __Pyx_GOTREF(__pyx_t_1);
22217  __pyx_v_pdb = __pyx_t_1;
22218  __pyx_t_1 = 0;
22219 
22220  /* "ADR.pyx":1012
22221  * #import numpy
22222  * import pdb
22223  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian) # <<<<<<<<<<<<<<
22224  * self.adr.calculateJacobian(#element
22225  * self.u[0].femSpace.elementMaps.psi,
22226  */
22227  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1012, __pyx_L1_error)
22228  __Pyx_GOTREF(__pyx_t_2);
22229  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeroJacobian_CSR); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1012, __pyx_L1_error)
22230  __Pyx_GOTREF(__pyx_t_3);
22231  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22232  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nNonzerosInJacobian); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1012, __pyx_L1_error)
22233  __Pyx_GOTREF(__pyx_t_2);
22234  __pyx_t_4 = NULL;
22235  __pyx_t_5 = 0;
22236  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
22237  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
22238  if (likely(__pyx_t_4)) {
22239  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
22240  __Pyx_INCREF(__pyx_t_4);
22241  __Pyx_INCREF(function);
22242  __Pyx_DECREF_SET(__pyx_t_3, function);
22243  __pyx_t_5 = 1;
22244  }
22245  }
22246  #if CYTHON_FAST_PYCALL
22247  if (PyFunction_Check(__pyx_t_3)) {
22248  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_jacobian};
22249  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1012, __pyx_L1_error)
22250  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22251  __Pyx_GOTREF(__pyx_t_1);
22252  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22253  } else
22254  #endif
22255  #if CYTHON_FAST_PYCCALL
22256  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
22257  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_jacobian};
22258  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1012, __pyx_L1_error)
22259  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22260  __Pyx_GOTREF(__pyx_t_1);
22261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22262  } else
22263  #endif
22264  {
22265  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1012, __pyx_L1_error)
22266  __Pyx_GOTREF(__pyx_t_6);
22267  if (__pyx_t_4) {
22268  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
22269  }
22270  __Pyx_GIVEREF(__pyx_t_2);
22271  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
22272  __Pyx_INCREF(__pyx_v_jacobian);
22273  __Pyx_GIVEREF(__pyx_v_jacobian);
22274  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_jacobian);
22275  __pyx_t_2 = 0;
22276  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1012, __pyx_L1_error)
22277  __Pyx_GOTREF(__pyx_t_1);
22278  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
22279  }
22280  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22281  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22282 
22283  /* "ADR.pyx":1013
22284  * import pdb
22285  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22286  * self.adr.calculateJacobian(#element # <<<<<<<<<<<<<<
22287  * self.u[0].femSpace.elementMaps.psi,
22288  * self.u[0].femSpace.elementMaps.grad_psi,
22289  */
22290  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_adr); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
22291  __Pyx_GOTREF(__pyx_t_3);
22292  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_calculateJacobian); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1013, __pyx_L1_error)
22293  __Pyx_GOTREF(__pyx_t_6);
22294  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22295 
22296  /* "ADR.pyx":1014
22297  * cfemIntegrals.zeroJacobian_CSR(self.nNonzerosInJacobian,jacobian)
22298  * self.adr.calculateJacobian(#element
22299  * self.u[0].femSpace.elementMaps.psi, # <<<<<<<<<<<<<<
22300  * self.u[0].femSpace.elementMaps.grad_psi,
22301  * self.mesh.nodeArray,
22302  */
22303  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1014, __pyx_L1_error)
22304  __Pyx_GOTREF(__pyx_t_3);
22305  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error)
22306  __Pyx_GOTREF(__pyx_t_2);
22307  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22308  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1014, __pyx_L1_error)
22309  __Pyx_GOTREF(__pyx_t_3);
22310  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22311  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1014, __pyx_L1_error)
22312  __Pyx_GOTREF(__pyx_t_2);
22313  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22314  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_psi); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1014, __pyx_L1_error)
22315  __Pyx_GOTREF(__pyx_t_3);
22316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22317 
22318  /* "ADR.pyx":1015
22319  * self.adr.calculateJacobian(#element
22320  * self.u[0].femSpace.elementMaps.psi,
22321  * self.u[0].femSpace.elementMaps.grad_psi, # <<<<<<<<<<<<<<
22322  * self.mesh.nodeArray,
22323  * self.mesh.elementNodesArray,
22324  */
22325  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
22326  __Pyx_GOTREF(__pyx_t_2);
22327  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1015, __pyx_L1_error)
22328  __Pyx_GOTREF(__pyx_t_4);
22329  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22330  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
22331  __Pyx_GOTREF(__pyx_t_2);
22332  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22333  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1015, __pyx_L1_error)
22334  __Pyx_GOTREF(__pyx_t_4);
22335  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22336  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
22337  __Pyx_GOTREF(__pyx_t_2);
22338  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22339 
22340  /* "ADR.pyx":1016
22341  * self.u[0].femSpace.elementMaps.psi,
22342  * self.u[0].femSpace.elementMaps.grad_psi,
22343  * self.mesh.nodeArray, # <<<<<<<<<<<<<<
22344  * self.mesh.elementNodesArray,
22345  * self.elementQuadratureWeights[('u',0)],
22346  */
22347  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1016, __pyx_L1_error)
22348  __Pyx_GOTREF(__pyx_t_4);
22349  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1016, __pyx_L1_error)
22350  __Pyx_GOTREF(__pyx_t_7);
22351  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22352 
22353  /* "ADR.pyx":1017
22354  * self.u[0].femSpace.elementMaps.grad_psi,
22355  * self.mesh.nodeArray,
22356  * self.mesh.elementNodesArray, # <<<<<<<<<<<<<<
22357  * self.elementQuadratureWeights[('u',0)],
22358  * self.u[0].femSpace.psi,
22359  */
22360  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1017, __pyx_L1_error)
22361  __Pyx_GOTREF(__pyx_t_4);
22362  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1017, __pyx_L1_error)
22363  __Pyx_GOTREF(__pyx_t_8);
22364  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22365 
22366  /* "ADR.pyx":1018
22367  * self.mesh.nodeArray,
22368  * self.mesh.elementNodesArray,
22369  * self.elementQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
22370  * self.u[0].femSpace.psi,
22371  * self.u[0].femSpace.grad_psi,
22372  */
22373  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadratureWeights); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1018, __pyx_L1_error)
22374  __Pyx_GOTREF(__pyx_t_4);
22375  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1018, __pyx_L1_error)
22376  __Pyx_GOTREF(__pyx_t_9);
22377  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22378 
22379  /* "ADR.pyx":1019
22380  * self.mesh.elementNodesArray,
22381  * self.elementQuadratureWeights[('u',0)],
22382  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
22383  * self.u[0].femSpace.grad_psi,
22384  * self.u[0].femSpace.psi,
22385  */
22386  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1019, __pyx_L1_error)
22387  __Pyx_GOTREF(__pyx_t_4);
22388  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1019, __pyx_L1_error)
22389  __Pyx_GOTREF(__pyx_t_10);
22390  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22391  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1019, __pyx_L1_error)
22392  __Pyx_GOTREF(__pyx_t_4);
22393  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
22394  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_psi); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1019, __pyx_L1_error)
22395  __Pyx_GOTREF(__pyx_t_10);
22396  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22397 
22398  /* "ADR.pyx":1020
22399  * self.elementQuadratureWeights[('u',0)],
22400  * self.u[0].femSpace.psi,
22401  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
22402  * self.u[0].femSpace.psi,
22403  * self.u[0].femSpace.grad_psi,
22404  */
22405  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1020, __pyx_L1_error)
22406  __Pyx_GOTREF(__pyx_t_4);
22407  __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1020, __pyx_L1_error)
22408  __Pyx_GOTREF(__pyx_t_11);
22409  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22410  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1020, __pyx_L1_error)
22411  __Pyx_GOTREF(__pyx_t_4);
22412  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
22413  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1020, __pyx_L1_error)
22414  __Pyx_GOTREF(__pyx_t_11);
22415  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22416 
22417  /* "ADR.pyx":1021
22418  * self.u[0].femSpace.psi,
22419  * self.u[0].femSpace.grad_psi,
22420  * self.u[0].femSpace.psi, # <<<<<<<<<<<<<<
22421  * self.u[0].femSpace.grad_psi,
22422  * self.mesh.elementDiametersArray,
22423  */
22424  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1021, __pyx_L1_error)
22425  __Pyx_GOTREF(__pyx_t_4);
22426  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1021, __pyx_L1_error)
22427  __Pyx_GOTREF(__pyx_t_12);
22428  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22429  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1021, __pyx_L1_error)
22430  __Pyx_GOTREF(__pyx_t_4);
22431  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
22432  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_psi); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1021, __pyx_L1_error)
22433  __Pyx_GOTREF(__pyx_t_12);
22434  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22435 
22436  /* "ADR.pyx":1022
22437  * self.u[0].femSpace.grad_psi,
22438  * self.u[0].femSpace.psi,
22439  * self.u[0].femSpace.grad_psi, # <<<<<<<<<<<<<<
22440  * self.mesh.elementDiametersArray,
22441  * self.q[('cfl',0)],
22442  */
22443  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1022, __pyx_L1_error)
22444  __Pyx_GOTREF(__pyx_t_4);
22445  __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1022, __pyx_L1_error)
22446  __Pyx_GOTREF(__pyx_t_13);
22447  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22448  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1022, __pyx_L1_error)
22449  __Pyx_GOTREF(__pyx_t_4);
22450  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
22451  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_grad_psi); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1022, __pyx_L1_error)
22452  __Pyx_GOTREF(__pyx_t_13);
22453  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22454 
22455  /* "ADR.pyx":1023
22456  * self.u[0].femSpace.psi,
22457  * self.u[0].femSpace.grad_psi,
22458  * self.mesh.elementDiametersArray, # <<<<<<<<<<<<<<
22459  * self.q[('cfl',0)],
22460  * self.shockCapturing.shockCapturingFactor,
22461  */
22462  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1023, __pyx_L1_error)
22463  __Pyx_GOTREF(__pyx_t_4);
22464  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1023, __pyx_L1_error)
22465  __Pyx_GOTREF(__pyx_t_14);
22466  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22467 
22468  /* "ADR.pyx":1024
22469  * self.u[0].femSpace.grad_psi,
22470  * self.mesh.elementDiametersArray,
22471  * self.q[('cfl',0)], # <<<<<<<<<<<<<<
22472  * self.shockCapturing.shockCapturingFactor,
22473  * self.coefficients.sc_uref,
22474  */
22475  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1024, __pyx_L1_error)
22476  __Pyx_GOTREF(__pyx_t_4);
22477  __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__13); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 1024, __pyx_L1_error)
22478  __Pyx_GOTREF(__pyx_t_15);
22479  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22480 
22481  /* "ADR.pyx":1025
22482  * self.mesh.elementDiametersArray,
22483  * self.q[('cfl',0)],
22484  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
22485  * self.coefficients.sc_uref,
22486  * self.coefficients.sc_beta,
22487  */
22488  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1025, __pyx_L1_error)
22489  __Pyx_GOTREF(__pyx_t_4);
22490  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 1025, __pyx_L1_error)
22491  __Pyx_GOTREF(__pyx_t_16);
22492  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22493 
22494  /* "ADR.pyx":1026
22495  * self.q[('cfl',0)],
22496  * self.shockCapturing.shockCapturingFactor,
22497  * self.coefficients.sc_uref, # <<<<<<<<<<<<<<
22498  * self.coefficients.sc_beta,
22499  * self.coefficients.useMetrics,
22500  */
22501  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1026, __pyx_L1_error)
22502  __Pyx_GOTREF(__pyx_t_4);
22503  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sc_uref); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 1026, __pyx_L1_error)
22504  __Pyx_GOTREF(__pyx_t_17);
22505  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22506 
22507  /* "ADR.pyx":1027
22508  * self.shockCapturing.shockCapturingFactor,
22509  * self.coefficients.sc_uref,
22510  * self.coefficients.sc_beta, # <<<<<<<<<<<<<<
22511  * self.coefficients.useMetrics,
22512  * #element boundary
22513  */
22514  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1027, __pyx_L1_error)
22515  __Pyx_GOTREF(__pyx_t_4);
22516  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sc_beta); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 1027, __pyx_L1_error)
22517  __Pyx_GOTREF(__pyx_t_18);
22518  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22519 
22520  /* "ADR.pyx":1028
22521  * self.coefficients.sc_uref,
22522  * self.coefficients.sc_beta,
22523  * self.coefficients.useMetrics, # <<<<<<<<<<<<<<
22524  * #element boundary
22525  * self.u[0].femSpace.elementMaps.psi_trace,
22526  */
22527  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1028, __pyx_L1_error)
22528  __Pyx_GOTREF(__pyx_t_4);
22529  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_useMetrics); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 1028, __pyx_L1_error)
22530  __Pyx_GOTREF(__pyx_t_19);
22531  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22532 
22533  /* "ADR.pyx":1030
22534  * self.coefficients.useMetrics,
22535  * #element boundary
22536  * self.u[0].femSpace.elementMaps.psi_trace, # <<<<<<<<<<<<<<
22537  * self.u[0].femSpace.elementMaps.grad_psi_trace,
22538  * self.elementBoundaryQuadratureWeights[('u',0)],
22539  */
22540  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1030, __pyx_L1_error)
22541  __Pyx_GOTREF(__pyx_t_4);
22542  __pyx_t_20 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 1030, __pyx_L1_error)
22543  __Pyx_GOTREF(__pyx_t_20);
22544  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22545  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1030, __pyx_L1_error)
22546  __Pyx_GOTREF(__pyx_t_4);
22547  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22548  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 1030, __pyx_L1_error)
22549  __Pyx_GOTREF(__pyx_t_20);
22550  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22551  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1030, __pyx_L1_error)
22552  __Pyx_GOTREF(__pyx_t_4);
22553  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22554 
22555  /* "ADR.pyx":1031
22556  * #element boundary
22557  * self.u[0].femSpace.elementMaps.psi_trace,
22558  * self.u[0].femSpace.elementMaps.grad_psi_trace, # <<<<<<<<<<<<<<
22559  * self.elementBoundaryQuadratureWeights[('u',0)],
22560  * self.u[0].femSpace.psi_trace,
22561  */
22562  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 1031, __pyx_L1_error)
22563  __Pyx_GOTREF(__pyx_t_20);
22564  __pyx_t_21 = __Pyx_GetItemInt(__pyx_t_20, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1031, __pyx_L1_error)
22565  __Pyx_GOTREF(__pyx_t_21);
22566  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22567  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 1031, __pyx_L1_error)
22568  __Pyx_GOTREF(__pyx_t_20);
22569  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22570  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1031, __pyx_L1_error)
22571  __Pyx_GOTREF(__pyx_t_21);
22572  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
22573  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 1031, __pyx_L1_error)
22574  __Pyx_GOTREF(__pyx_t_20);
22575  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22576 
22577  /* "ADR.pyx":1032
22578  * self.u[0].femSpace.elementMaps.psi_trace,
22579  * self.u[0].femSpace.elementMaps.grad_psi_trace,
22580  * self.elementBoundaryQuadratureWeights[('u',0)], # <<<<<<<<<<<<<<
22581  * self.u[0].femSpace.psi_trace,
22582  * self.u[0].femSpace.grad_psi_trace,
22583  */
22584  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadratureWeights); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1032, __pyx_L1_error)
22585  __Pyx_GOTREF(__pyx_t_21);
22586  __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_t_21, __pyx_tuple__8); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 1032, __pyx_L1_error)
22587  __Pyx_GOTREF(__pyx_t_22);
22588  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22589 
22590  /* "ADR.pyx":1033
22591  * self.u[0].femSpace.elementMaps.grad_psi_trace,
22592  * self.elementBoundaryQuadratureWeights[('u',0)],
22593  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
22594  * self.u[0].femSpace.grad_psi_trace,
22595  * self.u[0].femSpace.psi_trace,
22596  */
22597  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1033, __pyx_L1_error)
22598  __Pyx_GOTREF(__pyx_t_21);
22599  __pyx_t_23 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 1033, __pyx_L1_error)
22600  __Pyx_GOTREF(__pyx_t_23);
22601  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22602  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1033, __pyx_L1_error)
22603  __Pyx_GOTREF(__pyx_t_21);
22604  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
22605  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 1033, __pyx_L1_error)
22606  __Pyx_GOTREF(__pyx_t_23);
22607  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22608 
22609  /* "ADR.pyx":1034
22610  * self.elementBoundaryQuadratureWeights[('u',0)],
22611  * self.u[0].femSpace.psi_trace,
22612  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
22613  * self.u[0].femSpace.psi_trace,
22614  * self.u[0].femSpace.grad_psi_trace,
22615  */
22616  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1034, __pyx_L1_error)
22617  __Pyx_GOTREF(__pyx_t_21);
22618  __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 1034, __pyx_L1_error)
22619  __Pyx_GOTREF(__pyx_t_24);
22620  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22621  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1034, __pyx_L1_error)
22622  __Pyx_GOTREF(__pyx_t_21);
22623  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
22624  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 1034, __pyx_L1_error)
22625  __Pyx_GOTREF(__pyx_t_24);
22626  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22627 
22628  /* "ADR.pyx":1035
22629  * self.u[0].femSpace.psi_trace,
22630  * self.u[0].femSpace.grad_psi_trace,
22631  * self.u[0].femSpace.psi_trace, # <<<<<<<<<<<<<<
22632  * self.u[0].femSpace.grad_psi_trace,
22633  * self.u[0].femSpace.elementMaps.boundaryNormals,
22634  */
22635  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1035, __pyx_L1_error)
22636  __Pyx_GOTREF(__pyx_t_21);
22637  __pyx_t_25 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 1035, __pyx_L1_error)
22638  __Pyx_GOTREF(__pyx_t_25);
22639  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22640  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1035, __pyx_L1_error)
22641  __Pyx_GOTREF(__pyx_t_21);
22642  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
22643  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_psi_trace); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 1035, __pyx_L1_error)
22644  __Pyx_GOTREF(__pyx_t_25);
22645  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22646 
22647  /* "ADR.pyx":1036
22648  * self.u[0].femSpace.grad_psi_trace,
22649  * self.u[0].femSpace.psi_trace,
22650  * self.u[0].femSpace.grad_psi_trace, # <<<<<<<<<<<<<<
22651  * self.u[0].femSpace.elementMaps.boundaryNormals,
22652  * self.u[0].femSpace.elementMaps.boundaryJacobians,
22653  */
22654  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1036, __pyx_L1_error)
22655  __Pyx_GOTREF(__pyx_t_21);
22656  __pyx_t_26 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 1036, __pyx_L1_error)
22657  __Pyx_GOTREF(__pyx_t_26);
22658  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22659  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1036, __pyx_L1_error)
22660  __Pyx_GOTREF(__pyx_t_21);
22661  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
22662  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_grad_psi_trace); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 1036, __pyx_L1_error)
22663  __Pyx_GOTREF(__pyx_t_26);
22664  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22665 
22666  /* "ADR.pyx":1037
22667  * self.u[0].femSpace.psi_trace,
22668  * self.u[0].femSpace.grad_psi_trace,
22669  * self.u[0].femSpace.elementMaps.boundaryNormals, # <<<<<<<<<<<<<<
22670  * self.u[0].femSpace.elementMaps.boundaryJacobians,
22671  * self.mesh.nElements_global,
22672  */
22673  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1037, __pyx_L1_error)
22674  __Pyx_GOTREF(__pyx_t_21);
22675  __pyx_t_27 = __Pyx_GetItemInt(__pyx_t_21, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 1037, __pyx_L1_error)
22676  __Pyx_GOTREF(__pyx_t_27);
22677  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22678  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1037, __pyx_L1_error)
22679  __Pyx_GOTREF(__pyx_t_21);
22680  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22681  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 1037, __pyx_L1_error)
22682  __Pyx_GOTREF(__pyx_t_27);
22683  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
22684  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_boundaryNormals); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 1037, __pyx_L1_error)
22685  __Pyx_GOTREF(__pyx_t_21);
22686  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22687 
22688  /* "ADR.pyx":1038
22689  * self.u[0].femSpace.grad_psi_trace,
22690  * self.u[0].femSpace.elementMaps.boundaryNormals,
22691  * self.u[0].femSpace.elementMaps.boundaryJacobians, # <<<<<<<<<<<<<<
22692  * self.mesh.nElements_global,
22693  * self.u[0].femSpace.dofMap.l2g,
22694  */
22695  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 1038, __pyx_L1_error)
22696  __Pyx_GOTREF(__pyx_t_27);
22697  __pyx_t_28 = __Pyx_GetItemInt(__pyx_t_27, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 1038, __pyx_L1_error)
22698  __Pyx_GOTREF(__pyx_t_28);
22699  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22700  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 1038, __pyx_L1_error)
22701  __Pyx_GOTREF(__pyx_t_27);
22702  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22703  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 1038, __pyx_L1_error)
22704  __Pyx_GOTREF(__pyx_t_28);
22705  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
22706  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_boundaryJacobians); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 1038, __pyx_L1_error)
22707  __Pyx_GOTREF(__pyx_t_27);
22708  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22709 
22710  /* "ADR.pyx":1039
22711  * self.u[0].femSpace.elementMaps.boundaryNormals,
22712  * self.u[0].femSpace.elementMaps.boundaryJacobians,
22713  * self.mesh.nElements_global, # <<<<<<<<<<<<<<
22714  * self.u[0].femSpace.dofMap.l2g,
22715  * self.u[0].dof,
22716  */
22717  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 1039, __pyx_L1_error)
22718  __Pyx_GOTREF(__pyx_t_28);
22719  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 1039, __pyx_L1_error)
22720  __Pyx_GOTREF(__pyx_t_29);
22721  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22722 
22723  /* "ADR.pyx":1040
22724  * self.u[0].femSpace.elementMaps.boundaryJacobians,
22725  * self.mesh.nElements_global,
22726  * self.u[0].femSpace.dofMap.l2g, # <<<<<<<<<<<<<<
22727  * self.u[0].dof,
22728  * self.coefficients.sdInfo[(0,0)][0],
22729  */
22730  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 1040, __pyx_L1_error)
22731  __Pyx_GOTREF(__pyx_t_28);
22732  __pyx_t_30 = __Pyx_GetItemInt(__pyx_t_28, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 1040, __pyx_L1_error)
22733  __Pyx_GOTREF(__pyx_t_30);
22734  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22735  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 1040, __pyx_L1_error)
22736  __Pyx_GOTREF(__pyx_t_28);
22737  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
22738  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_28, __pyx_n_s_dofMap); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 1040, __pyx_L1_error)
22739  __Pyx_GOTREF(__pyx_t_30);
22740  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
22741  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_30, __pyx_n_s_l2g); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 1040, __pyx_L1_error)
22742  __Pyx_GOTREF(__pyx_t_28);
22743  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
22744 
22745  /* "ADR.pyx":1041
22746  * self.mesh.nElements_global,
22747  * self.u[0].femSpace.dofMap.l2g,
22748  * self.u[0].dof, # <<<<<<<<<<<<<<
22749  * self.coefficients.sdInfo[(0,0)][0],
22750  * self.coefficients.sdInfo[(0,0)][1],
22751  */
22752  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 1041, __pyx_L1_error)
22753  __Pyx_GOTREF(__pyx_t_30);
22754  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_30, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1041, __pyx_L1_error)
22755  __Pyx_GOTREF(__pyx_t_31);
22756  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
22757  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_dof); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 1041, __pyx_L1_error)
22758  __Pyx_GOTREF(__pyx_t_30);
22759  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22760 
22761  /* "ADR.pyx":1042
22762  * self.u[0].femSpace.dofMap.l2g,
22763  * self.u[0].dof,
22764  * self.coefficients.sdInfo[(0,0)][0], # <<<<<<<<<<<<<<
22765  * self.coefficients.sdInfo[(0,0)][1],
22766  * self.q[('a',0,0)],
22767  */
22768  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1042, __pyx_L1_error)
22769  __Pyx_GOTREF(__pyx_t_31);
22770  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 1042, __pyx_L1_error)
22771  __Pyx_GOTREF(__pyx_t_32);
22772  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22773  __pyx_t_31 = __Pyx_PyObject_GetItem(__pyx_t_32, __pyx_tuple__4); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1042, __pyx_L1_error)
22774  __Pyx_GOTREF(__pyx_t_31);
22775  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
22776  __pyx_t_32 = __Pyx_GetItemInt(__pyx_t_31, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 1042, __pyx_L1_error)
22777  __Pyx_GOTREF(__pyx_t_32);
22778  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22779 
22780  /* "ADR.pyx":1043
22781  * self.u[0].dof,
22782  * self.coefficients.sdInfo[(0,0)][0],
22783  * self.coefficients.sdInfo[(0,0)][1], # <<<<<<<<<<<<<<
22784  * self.q[('a',0,0)],
22785  * self.q[('df',0,0)],
22786  */
22787  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1043, __pyx_L1_error)
22788  __Pyx_GOTREF(__pyx_t_31);
22789  __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_sdInfo); if (unlikely(!__pyx_t_33)) __PYX_ERR(1, 1043, __pyx_L1_error)
22790  __Pyx_GOTREF(__pyx_t_33);
22791  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22792  __pyx_t_31 = __Pyx_PyObject_GetItem(__pyx_t_33, __pyx_tuple__4); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1043, __pyx_L1_error)
22793  __Pyx_GOTREF(__pyx_t_31);
22794  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
22795  __pyx_t_33 = __Pyx_GetItemInt(__pyx_t_31, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_33)) __PYX_ERR(1, 1043, __pyx_L1_error)
22796  __Pyx_GOTREF(__pyx_t_33);
22797  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22798 
22799  /* "ADR.pyx":1044
22800  * self.coefficients.sdInfo[(0,0)][0],
22801  * self.coefficients.sdInfo[(0,0)][1],
22802  * self.q[('a',0,0)], # <<<<<<<<<<<<<<
22803  * self.q[('df',0,0)],
22804  * self.q[('r',0)],
22805  */
22806  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1044, __pyx_L1_error)
22807  __Pyx_GOTREF(__pyx_t_31);
22808  __pyx_t_34 = __Pyx_PyObject_GetItem(__pyx_t_31, __pyx_tuple__10); if (unlikely(!__pyx_t_34)) __PYX_ERR(1, 1044, __pyx_L1_error)
22809  __Pyx_GOTREF(__pyx_t_34);
22810  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22811 
22812  /* "ADR.pyx":1045
22813  * self.coefficients.sdInfo[(0,0)][1],
22814  * self.q[('a',0,0)],
22815  * self.q[('df',0,0)], # <<<<<<<<<<<<<<
22816  * self.q[('r',0)],
22817  * self.shockCapturing.lag,
22818  */
22819  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1045, __pyx_L1_error)
22820  __Pyx_GOTREF(__pyx_t_31);
22821  __pyx_t_35 = __Pyx_PyObject_GetItem(__pyx_t_31, __pyx_tuple__11); if (unlikely(!__pyx_t_35)) __PYX_ERR(1, 1045, __pyx_L1_error)
22822  __Pyx_GOTREF(__pyx_t_35);
22823  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22824 
22825  /* "ADR.pyx":1046
22826  * self.q[('a',0,0)],
22827  * self.q[('df',0,0)],
22828  * self.q[('r',0)], # <<<<<<<<<<<<<<
22829  * self.shockCapturing.lag,
22830  * self.shockCapturing.shockCapturingFactor,
22831  */
22832  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1046, __pyx_L1_error)
22833  __Pyx_GOTREF(__pyx_t_31);
22834  __pyx_t_36 = __Pyx_PyObject_GetItem(__pyx_t_31, __pyx_tuple__12); if (unlikely(!__pyx_t_36)) __PYX_ERR(1, 1046, __pyx_L1_error)
22835  __Pyx_GOTREF(__pyx_t_36);
22836  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22837 
22838  /* "ADR.pyx":1047
22839  * self.q[('df',0,0)],
22840  * self.q[('r',0)],
22841  * self.shockCapturing.lag, # <<<<<<<<<<<<<<
22842  * self.shockCapturing.shockCapturingFactor,
22843  * self.shockCapturing.numDiff[0],
22844  */
22845  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1047, __pyx_L1_error)
22846  __Pyx_GOTREF(__pyx_t_31);
22847  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_lag); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 1047, __pyx_L1_error)
22848  __Pyx_GOTREF(__pyx_t_37);
22849  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22850 
22851  /* "ADR.pyx":1048
22852  * self.q[('r',0)],
22853  * self.shockCapturing.lag,
22854  * self.shockCapturing.shockCapturingFactor, # <<<<<<<<<<<<<<
22855  * self.shockCapturing.numDiff[0],
22856  * self.shockCapturing.numDiff_last[0],
22857  */
22858  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1048, __pyx_L1_error)
22859  __Pyx_GOTREF(__pyx_t_31);
22860  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_shockCapturingFactor); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 1048, __pyx_L1_error)
22861  __Pyx_GOTREF(__pyx_t_38);
22862  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22863 
22864  /* "ADR.pyx":1049
22865  * self.shockCapturing.lag,
22866  * self.shockCapturing.shockCapturingFactor,
22867  * self.shockCapturing.numDiff[0], # <<<<<<<<<<<<<<
22868  * self.shockCapturing.numDiff_last[0],
22869  * self.csrRowIndeces[(0,0)],
22870  */
22871  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1049, __pyx_L1_error)
22872  __Pyx_GOTREF(__pyx_t_31);
22873  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_31, __pyx_n_s_numDiff); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 1049, __pyx_L1_error)
22874  __Pyx_GOTREF(__pyx_t_39);
22875  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
22876  __pyx_t_31 = __Pyx_GetItemInt(__pyx_t_39, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 1049, __pyx_L1_error)
22877  __Pyx_GOTREF(__pyx_t_31);
22878  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
22879 
22880  /* "ADR.pyx":1050
22881  * self.shockCapturing.shockCapturingFactor,
22882  * self.shockCapturing.numDiff[0],
22883  * self.shockCapturing.numDiff_last[0], # <<<<<<<<<<<<<<
22884  * self.csrRowIndeces[(0,0)],
22885  * self.csrColumnOffsets[(0,0)],
22886  */
22887  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 1050, __pyx_L1_error)
22888  __Pyx_GOTREF(__pyx_t_39);
22889  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_39, __pyx_n_s_numDiff_last); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1050, __pyx_L1_error)
22890  __Pyx_GOTREF(__pyx_t_40);
22891  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
22892  __pyx_t_39 = __Pyx_GetItemInt(__pyx_t_40, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 1050, __pyx_L1_error)
22893  __Pyx_GOTREF(__pyx_t_39);
22894  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22895 
22896  /* "ADR.pyx":1051
22897  * self.shockCapturing.numDiff[0],
22898  * self.shockCapturing.numDiff_last[0],
22899  * self.csrRowIndeces[(0,0)], # <<<<<<<<<<<<<<
22900  * self.csrColumnOffsets[(0,0)],
22901  * jacobian,
22902  */
22903  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrRowIndeces); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1051, __pyx_L1_error)
22904  __Pyx_GOTREF(__pyx_t_40);
22905  __pyx_t_41 = __Pyx_PyObject_GetItem(__pyx_t_40, __pyx_tuple__4); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 1051, __pyx_L1_error)
22906  __Pyx_GOTREF(__pyx_t_41);
22907  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22908 
22909  /* "ADR.pyx":1052
22910  * self.shockCapturing.numDiff_last[0],
22911  * self.csrRowIndeces[(0,0)],
22912  * self.csrColumnOffsets[(0,0)], # <<<<<<<<<<<<<<
22913  * jacobian,
22914  * self.mesh.nExteriorElementBoundaries_global,
22915  */
22916  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrColumnOffsets); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1052, __pyx_L1_error)
22917  __Pyx_GOTREF(__pyx_t_40);
22918  __pyx_t_42 = __Pyx_PyObject_GetItem(__pyx_t_40, __pyx_tuple__4); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 1052, __pyx_L1_error)
22919  __Pyx_GOTREF(__pyx_t_42);
22920  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22921 
22922  /* "ADR.pyx":1054
22923  * self.csrColumnOffsets[(0,0)],
22924  * jacobian,
22925  * self.mesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
22926  * self.mesh.exteriorElementBoundariesArray,
22927  * self.mesh.elementBoundaryElementsArray,
22928  */
22929  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1054, __pyx_L1_error)
22930  __Pyx_GOTREF(__pyx_t_40);
22931  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 1054, __pyx_L1_error)
22932  __Pyx_GOTREF(__pyx_t_43);
22933  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22934 
22935  /* "ADR.pyx":1055
22936  * jacobian,
22937  * self.mesh.nExteriorElementBoundaries_global,
22938  * self.mesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
22939  * self.mesh.elementBoundaryElementsArray,
22940  * self.mesh.elementBoundaryLocalElementBoundariesArray,
22941  */
22942  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1055, __pyx_L1_error)
22943  __Pyx_GOTREF(__pyx_t_40);
22944  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(1, 1055, __pyx_L1_error)
22945  __Pyx_GOTREF(__pyx_t_44);
22946  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22947 
22948  /* "ADR.pyx":1056
22949  * self.mesh.nExteriorElementBoundaries_global,
22950  * self.mesh.exteriorElementBoundariesArray,
22951  * self.mesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
22952  * self.mesh.elementBoundaryLocalElementBoundariesArray,
22953  * self.ebqe[('a',0,0)],
22954  */
22955  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1056, __pyx_L1_error)
22956  __Pyx_GOTREF(__pyx_t_40);
22957  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_45)) __PYX_ERR(1, 1056, __pyx_L1_error)
22958  __Pyx_GOTREF(__pyx_t_45);
22959  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22960 
22961  /* "ADR.pyx":1057
22962  * self.mesh.exteriorElementBoundariesArray,
22963  * self.mesh.elementBoundaryElementsArray,
22964  * self.mesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
22965  * self.ebqe[('a',0,0)],
22966  * self.ebqe[('df',0,0)],
22967  */
22968  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1057, __pyx_L1_error)
22969  __Pyx_GOTREF(__pyx_t_40);
22970  __pyx_t_46 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_46)) __PYX_ERR(1, 1057, __pyx_L1_error)
22971  __Pyx_GOTREF(__pyx_t_46);
22972  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22973 
22974  /* "ADR.pyx":1058
22975  * self.mesh.elementBoundaryElementsArray,
22976  * self.mesh.elementBoundaryLocalElementBoundariesArray,
22977  * self.ebqe[('a',0,0)], # <<<<<<<<<<<<<<
22978  * self.ebqe[('df',0,0)],
22979  * self.numericalFlux.isDOFBoundary[0],
22980  */
22981  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1058, __pyx_L1_error)
22982  __Pyx_GOTREF(__pyx_t_40);
22983  __pyx_t_47 = __Pyx_PyObject_GetItem(__pyx_t_40, __pyx_tuple__10); if (unlikely(!__pyx_t_47)) __PYX_ERR(1, 1058, __pyx_L1_error)
22984  __Pyx_GOTREF(__pyx_t_47);
22985  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22986 
22987  /* "ADR.pyx":1059
22988  * self.mesh.elementBoundaryLocalElementBoundariesArray,
22989  * self.ebqe[('a',0,0)],
22990  * self.ebqe[('df',0,0)], # <<<<<<<<<<<<<<
22991  * self.numericalFlux.isDOFBoundary[0],
22992  * self.numericalFlux.ebqe[('u',0)],
22993  */
22994  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1059, __pyx_L1_error)
22995  __Pyx_GOTREF(__pyx_t_40);
22996  __pyx_t_48 = __Pyx_PyObject_GetItem(__pyx_t_40, __pyx_tuple__11); if (unlikely(!__pyx_t_48)) __PYX_ERR(1, 1059, __pyx_L1_error)
22997  __Pyx_GOTREF(__pyx_t_48);
22998  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
22999 
23000  /* "ADR.pyx":1060
23001  * self.ebqe[('a',0,0)],
23002  * self.ebqe[('df',0,0)],
23003  * self.numericalFlux.isDOFBoundary[0], # <<<<<<<<<<<<<<
23004  * self.numericalFlux.ebqe[('u',0)],
23005  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23006  */
23007  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1060, __pyx_L1_error)
23008  __Pyx_GOTREF(__pyx_t_40);
23009  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_t_40, __pyx_n_s_isDOFBoundary); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 1060, __pyx_L1_error)
23010  __Pyx_GOTREF(__pyx_t_49);
23011  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23012  __pyx_t_40 = __Pyx_GetItemInt(__pyx_t_49, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 1060, __pyx_L1_error)
23013  __Pyx_GOTREF(__pyx_t_40);
23014  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23015 
23016  /* "ADR.pyx":1061
23017  * self.ebqe[('df',0,0)],
23018  * self.numericalFlux.isDOFBoundary[0],
23019  * self.numericalFlux.ebqe[('u',0)], # <<<<<<<<<<<<<<
23020  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23021  * self.ebqe[('advectiveFlux_bc_flag',0)],
23022  */
23023  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 1061, __pyx_L1_error)
23024  __Pyx_GOTREF(__pyx_t_49);
23025  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_t_49, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1061, __pyx_L1_error)
23026  __Pyx_GOTREF(__pyx_t_50);
23027  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23028  __pyx_t_49 = __Pyx_PyObject_GetItem(__pyx_t_50, __pyx_tuple__8); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 1061, __pyx_L1_error)
23029  __Pyx_GOTREF(__pyx_t_49);
23030  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23031 
23032  /* "ADR.pyx":1062
23033  * self.numericalFlux.isDOFBoundary[0],
23034  * self.numericalFlux.ebqe[('u',0)],
23035  * self.ebqe[('diffusiveFlux_bc_flag',0,0)], # <<<<<<<<<<<<<<
23036  * self.ebqe[('advectiveFlux_bc_flag',0)],
23037  * self.ebqe[('diffusiveFlux_bc',0,0)],
23038  */
23039  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1062, __pyx_L1_error)
23040  __Pyx_GOTREF(__pyx_t_50);
23041  __pyx_t_51 = __Pyx_PyObject_GetItem(__pyx_t_50, __pyx_tuple__15); if (unlikely(!__pyx_t_51)) __PYX_ERR(1, 1062, __pyx_L1_error)
23042  __Pyx_GOTREF(__pyx_t_51);
23043  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23044 
23045  /* "ADR.pyx":1063
23046  * self.numericalFlux.ebqe[('u',0)],
23047  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23048  * self.ebqe[('advectiveFlux_bc_flag',0)], # <<<<<<<<<<<<<<
23049  * self.ebqe[('diffusiveFlux_bc',0,0)],
23050  * self.ebqe[('advectiveFlux_bc',0)],
23051  */
23052  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1063, __pyx_L1_error)
23053  __Pyx_GOTREF(__pyx_t_50);
23054  __pyx_t_52 = __Pyx_PyObject_GetItem(__pyx_t_50, __pyx_tuple__17); if (unlikely(!__pyx_t_52)) __PYX_ERR(1, 1063, __pyx_L1_error)
23055  __Pyx_GOTREF(__pyx_t_52);
23056  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23057 
23058  /* "ADR.pyx":1064
23059  * self.ebqe[('diffusiveFlux_bc_flag',0,0)],
23060  * self.ebqe[('advectiveFlux_bc_flag',0)],
23061  * self.ebqe[('diffusiveFlux_bc',0,0)], # <<<<<<<<<<<<<<
23062  * self.ebqe[('advectiveFlux_bc',0)],
23063  * self.csrColumnOffsets_eb[(0,0)],
23064  */
23065  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1064, __pyx_L1_error)
23066  __Pyx_GOTREF(__pyx_t_50);
23067  __pyx_t_53 = __Pyx_PyObject_GetItem(__pyx_t_50, __pyx_tuple__16); if (unlikely(!__pyx_t_53)) __PYX_ERR(1, 1064, __pyx_L1_error)
23068  __Pyx_GOTREF(__pyx_t_53);
23069  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23070 
23071  /* "ADR.pyx":1065
23072  * self.ebqe[('advectiveFlux_bc_flag',0)],
23073  * self.ebqe[('diffusiveFlux_bc',0,0)],
23074  * self.ebqe[('advectiveFlux_bc',0)], # <<<<<<<<<<<<<<
23075  * self.csrColumnOffsets_eb[(0,0)],
23076  * self.ebqe['penalty'],
23077  */
23078  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1065, __pyx_L1_error)
23079  __Pyx_GOTREF(__pyx_t_50);
23080  __pyx_t_54 = __Pyx_PyObject_GetItem(__pyx_t_50, __pyx_tuple__18); if (unlikely(!__pyx_t_54)) __PYX_ERR(1, 1065, __pyx_L1_error)
23081  __Pyx_GOTREF(__pyx_t_54);
23082  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23083 
23084  /* "ADR.pyx":1066
23085  * self.ebqe[('diffusiveFlux_bc',0,0)],
23086  * self.ebqe[('advectiveFlux_bc',0)],
23087  * self.csrColumnOffsets_eb[(0,0)], # <<<<<<<<<<<<<<
23088  * self.ebqe['penalty'],
23089  * self.numericalFlux.boundaryAdjoint_sigma)
23090  */
23091  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_csrColumnOffsets_eb); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1066, __pyx_L1_error)
23092  __Pyx_GOTREF(__pyx_t_50);
23093  __pyx_t_55 = __Pyx_PyObject_GetItem(__pyx_t_50, __pyx_tuple__4); if (unlikely(!__pyx_t_55)) __PYX_ERR(1, 1066, __pyx_L1_error)
23094  __Pyx_GOTREF(__pyx_t_55);
23095  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23096 
23097  /* "ADR.pyx":1067
23098  * self.ebqe[('advectiveFlux_bc',0)],
23099  * self.csrColumnOffsets_eb[(0,0)],
23100  * self.ebqe['penalty'], # <<<<<<<<<<<<<<
23101  * self.numericalFlux.boundaryAdjoint_sigma)
23102  * log("Jacobian ",level=10,data=jacobian)
23103  */
23104  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1067, __pyx_L1_error)
23105  __Pyx_GOTREF(__pyx_t_50);
23106  __pyx_t_56 = __Pyx_PyObject_Dict_GetItem(__pyx_t_50, __pyx_n_s_penalty); if (unlikely(!__pyx_t_56)) __PYX_ERR(1, 1067, __pyx_L1_error)
23107  __Pyx_GOTREF(__pyx_t_56);
23108  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23109 
23110  /* "ADR.pyx":1068
23111  * self.csrColumnOffsets_eb[(0,0)],
23112  * self.ebqe['penalty'],
23113  * self.numericalFlux.boundaryAdjoint_sigma) # <<<<<<<<<<<<<<
23114  * log("Jacobian ",level=10,data=jacobian)
23115  * #mwf decide if this is reasonable for solver statistics
23116  */
23117  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_numericalFlux); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 1068, __pyx_L1_error)
23118  __Pyx_GOTREF(__pyx_t_50);
23119  __pyx_t_57 = __Pyx_PyObject_GetAttrStr(__pyx_t_50, __pyx_n_s_boundaryAdjoint_sigma); if (unlikely(!__pyx_t_57)) __PYX_ERR(1, 1068, __pyx_L1_error)
23120  __Pyx_GOTREF(__pyx_t_57);
23121  __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
23122  __pyx_t_50 = NULL;
23123  __pyx_t_5 = 0;
23124  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
23125  __pyx_t_50 = PyMethod_GET_SELF(__pyx_t_6);
23126  if (likely(__pyx_t_50)) {
23127  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
23128  __Pyx_INCREF(__pyx_t_50);
23129  __Pyx_INCREF(function);
23130  __Pyx_DECREF_SET(__pyx_t_6, function);
23131  __pyx_t_5 = 1;
23132  }
23133  }
23134  #if CYTHON_FAST_PYCALL
23135  if (PyFunction_Check(__pyx_t_6)) {
23136  PyObject *__pyx_temp[55] = {__pyx_t_50, __pyx_t_3, __pyx_t_2, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_4, __pyx_t_20, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_21, __pyx_t_27, __pyx_t_29, __pyx_t_28, __pyx_t_30, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_31, __pyx_t_39, __pyx_t_41, __pyx_t_42, __pyx_v_jacobian, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_48, __pyx_t_40, __pyx_t_49, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55, __pyx_t_56, __pyx_t_57};
23137  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 54+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1013, __pyx_L1_error)
23138  __Pyx_XDECREF(__pyx_t_50); __pyx_t_50 = 0;
23139  __Pyx_GOTREF(__pyx_t_1);
23140  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23141  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23142  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23143  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23144  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
23145  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23146  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23147  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23148  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
23149  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23150  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23151  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23152  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23153  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
23154  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
23155  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23156  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23157  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
23158  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23159  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23160  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23161  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23162  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23163  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23164  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
23165  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23166  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23167  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23168  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23169  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
23170  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
23171  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
23172  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
23173  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
23174  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23175  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23176  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
23177  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
23178  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
23179  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
23180  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
23181  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
23182  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
23183  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
23184  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23185  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23186  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
23187  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
23188  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
23189  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
23190  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
23191  __Pyx_DECREF(__pyx_t_56); __pyx_t_56 = 0;
23192  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
23193  } else
23194  #endif
23195  #if CYTHON_FAST_PYCCALL
23196  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
23197  PyObject *__pyx_temp[55] = {__pyx_t_50, __pyx_t_3, __pyx_t_2, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_4, __pyx_t_20, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_21, __pyx_t_27, __pyx_t_29, __pyx_t_28, __pyx_t_30, __pyx_t_32, __pyx_t_33, __pyx_t_34, __pyx_t_35, __pyx_t_36, __pyx_t_37, __pyx_t_38, __pyx_t_31, __pyx_t_39, __pyx_t_41, __pyx_t_42, __pyx_v_jacobian, __pyx_t_43, __pyx_t_44, __pyx_t_45, __pyx_t_46, __pyx_t_47, __pyx_t_48, __pyx_t_40, __pyx_t_49, __pyx_t_51, __pyx_t_52, __pyx_t_53, __pyx_t_54, __pyx_t_55, __pyx_t_56, __pyx_t_57};
23198  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 54+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1013, __pyx_L1_error)
23199  __Pyx_XDECREF(__pyx_t_50); __pyx_t_50 = 0;
23200  __Pyx_GOTREF(__pyx_t_1);
23201  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23202  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23203  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23204  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
23205  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
23206  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23207  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23208  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23209  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
23210  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23211  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23212  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23213  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23214  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
23215  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
23216  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23217  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
23218  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
23219  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
23220  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
23221  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
23222  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
23223  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
23224  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
23225  __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
23226  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
23227  __Pyx_DECREF(__pyx_t_30); __pyx_t_30 = 0;
23228  __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0;
23229  __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0;
23230  __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0;
23231  __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0;
23232  __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
23233  __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
23234  __Pyx_DECREF(__pyx_t_38); __pyx_t_38 = 0;
23235  __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
23236  __Pyx_DECREF(__pyx_t_39); __pyx_t_39 = 0;
23237  __Pyx_DECREF(__pyx_t_41); __pyx_t_41 = 0;
23238  __Pyx_DECREF(__pyx_t_42); __pyx_t_42 = 0;
23239  __Pyx_DECREF(__pyx_t_43); __pyx_t_43 = 0;
23240  __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
23241  __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
23242  __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
23243  __Pyx_DECREF(__pyx_t_47); __pyx_t_47 = 0;
23244  __Pyx_DECREF(__pyx_t_48); __pyx_t_48 = 0;
23245  __Pyx_DECREF(__pyx_t_40); __pyx_t_40 = 0;
23246  __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
23247  __Pyx_DECREF(__pyx_t_51); __pyx_t_51 = 0;
23248  __Pyx_DECREF(__pyx_t_52); __pyx_t_52 = 0;
23249  __Pyx_DECREF(__pyx_t_53); __pyx_t_53 = 0;
23250  __Pyx_DECREF(__pyx_t_54); __pyx_t_54 = 0;
23251  __Pyx_DECREF(__pyx_t_55); __pyx_t_55 = 0;
23252  __Pyx_DECREF(__pyx_t_56); __pyx_t_56 = 0;
23253  __Pyx_DECREF(__pyx_t_57); __pyx_t_57 = 0;
23254  } else
23255  #endif
23256  {
23257  __pyx_t_58 = PyTuple_New(54+__pyx_t_5); if (unlikely(!__pyx_t_58)) __PYX_ERR(1, 1013, __pyx_L1_error)
23258  __Pyx_GOTREF(__pyx_t_58);
23259  if (__pyx_t_50) {
23260  __Pyx_GIVEREF(__pyx_t_50); PyTuple_SET_ITEM(__pyx_t_58, 0, __pyx_t_50); __pyx_t_50 = NULL;
23261  }
23262  __Pyx_GIVEREF(__pyx_t_3);
23263  PyTuple_SET_ITEM(__pyx_t_58, 0+__pyx_t_5, __pyx_t_3);
23264  __Pyx_GIVEREF(__pyx_t_2);
23265  PyTuple_SET_ITEM(__pyx_t_58, 1+__pyx_t_5, __pyx_t_2);
23266  __Pyx_GIVEREF(__pyx_t_7);
23267  PyTuple_SET_ITEM(__pyx_t_58, 2+__pyx_t_5, __pyx_t_7);
23268  __Pyx_GIVEREF(__pyx_t_8);
23269  PyTuple_SET_ITEM(__pyx_t_58, 3+__pyx_t_5, __pyx_t_8);
23270  __Pyx_GIVEREF(__pyx_t_9);
23271  PyTuple_SET_ITEM(__pyx_t_58, 4+__pyx_t_5, __pyx_t_9);
23272  __Pyx_GIVEREF(__pyx_t_10);
23273  PyTuple_SET_ITEM(__pyx_t_58, 5+__pyx_t_5, __pyx_t_10);
23274  __Pyx_GIVEREF(__pyx_t_11);
23275  PyTuple_SET_ITEM(__pyx_t_58, 6+__pyx_t_5, __pyx_t_11);
23276  __Pyx_GIVEREF(__pyx_t_12);
23277  PyTuple_SET_ITEM(__pyx_t_58, 7+__pyx_t_5, __pyx_t_12);
23278  __Pyx_GIVEREF(__pyx_t_13);
23279  PyTuple_SET_ITEM(__pyx_t_58, 8+__pyx_t_5, __pyx_t_13);
23280  __Pyx_GIVEREF(__pyx_t_14);
23281  PyTuple_SET_ITEM(__pyx_t_58, 9+__pyx_t_5, __pyx_t_14);
23282  __Pyx_GIVEREF(__pyx_t_15);
23283  PyTuple_SET_ITEM(__pyx_t_58, 10+__pyx_t_5, __pyx_t_15);
23284  __Pyx_GIVEREF(__pyx_t_16);
23285  PyTuple_SET_ITEM(__pyx_t_58, 11+__pyx_t_5, __pyx_t_16);
23286  __Pyx_GIVEREF(__pyx_t_17);
23287  PyTuple_SET_ITEM(__pyx_t_58, 12+__pyx_t_5, __pyx_t_17);
23288  __Pyx_GIVEREF(__pyx_t_18);
23289  PyTuple_SET_ITEM(__pyx_t_58, 13+__pyx_t_5, __pyx_t_18);
23290  __Pyx_GIVEREF(__pyx_t_19);
23291  PyTuple_SET_ITEM(__pyx_t_58, 14+__pyx_t_5, __pyx_t_19);
23292  __Pyx_GIVEREF(__pyx_t_4);
23293  PyTuple_SET_ITEM(__pyx_t_58, 15+__pyx_t_5, __pyx_t_4);
23294  __Pyx_GIVEREF(__pyx_t_20);
23295  PyTuple_SET_ITEM(__pyx_t_58, 16+__pyx_t_5, __pyx_t_20);
23296  __Pyx_GIVEREF(__pyx_t_22);
23297  PyTuple_SET_ITEM(__pyx_t_58, 17+__pyx_t_5, __pyx_t_22);
23298  __Pyx_GIVEREF(__pyx_t_23);
23299  PyTuple_SET_ITEM(__pyx_t_58, 18+__pyx_t_5, __pyx_t_23);
23300  __Pyx_GIVEREF(__pyx_t_24);
23301  PyTuple_SET_ITEM(__pyx_t_58, 19+__pyx_t_5, __pyx_t_24);
23302  __Pyx_GIVEREF(__pyx_t_25);
23303  PyTuple_SET_ITEM(__pyx_t_58, 20+__pyx_t_5, __pyx_t_25);
23304  __Pyx_GIVEREF(__pyx_t_26);
23305  PyTuple_SET_ITEM(__pyx_t_58, 21+__pyx_t_5, __pyx_t_26);
23306  __Pyx_GIVEREF(__pyx_t_21);
23307  PyTuple_SET_ITEM(__pyx_t_58, 22+__pyx_t_5, __pyx_t_21);
23308  __Pyx_GIVEREF(__pyx_t_27);
23309  PyTuple_SET_ITEM(__pyx_t_58, 23+__pyx_t_5, __pyx_t_27);
23310  __Pyx_GIVEREF(__pyx_t_29);
23311  PyTuple_SET_ITEM(__pyx_t_58, 24+__pyx_t_5, __pyx_t_29);
23312  __Pyx_GIVEREF(__pyx_t_28);
23313  PyTuple_SET_ITEM(__pyx_t_58, 25+__pyx_t_5, __pyx_t_28);
23314  __Pyx_GIVEREF(__pyx_t_30);
23315  PyTuple_SET_ITEM(__pyx_t_58, 26+__pyx_t_5, __pyx_t_30);
23316  __Pyx_GIVEREF(__pyx_t_32);
23317  PyTuple_SET_ITEM(__pyx_t_58, 27+__pyx_t_5, __pyx_t_32);
23318  __Pyx_GIVEREF(__pyx_t_33);
23319  PyTuple_SET_ITEM(__pyx_t_58, 28+__pyx_t_5, __pyx_t_33);
23320  __Pyx_GIVEREF(__pyx_t_34);
23321  PyTuple_SET_ITEM(__pyx_t_58, 29+__pyx_t_5, __pyx_t_34);
23322  __Pyx_GIVEREF(__pyx_t_35);
23323  PyTuple_SET_ITEM(__pyx_t_58, 30+__pyx_t_5, __pyx_t_35);
23324  __Pyx_GIVEREF(__pyx_t_36);
23325  PyTuple_SET_ITEM(__pyx_t_58, 31+__pyx_t_5, __pyx_t_36);
23326  __Pyx_GIVEREF(__pyx_t_37);
23327  PyTuple_SET_ITEM(__pyx_t_58, 32+__pyx_t_5, __pyx_t_37);
23328  __Pyx_GIVEREF(__pyx_t_38);
23329  PyTuple_SET_ITEM(__pyx_t_58, 33+__pyx_t_5, __pyx_t_38);
23330  __Pyx_GIVEREF(__pyx_t_31);
23331  PyTuple_SET_ITEM(__pyx_t_58, 34+__pyx_t_5, __pyx_t_31);
23332  __Pyx_GIVEREF(__pyx_t_39);
23333  PyTuple_SET_ITEM(__pyx_t_58, 35+__pyx_t_5, __pyx_t_39);
23334  __Pyx_GIVEREF(__pyx_t_41);
23335  PyTuple_SET_ITEM(__pyx_t_58, 36+__pyx_t_5, __pyx_t_41);
23336  __Pyx_GIVEREF(__pyx_t_42);
23337  PyTuple_SET_ITEM(__pyx_t_58, 37+__pyx_t_5, __pyx_t_42);
23338  __Pyx_INCREF(__pyx_v_jacobian);
23339  __Pyx_GIVEREF(__pyx_v_jacobian);
23340  PyTuple_SET_ITEM(__pyx_t_58, 38+__pyx_t_5, __pyx_v_jacobian);
23341  __Pyx_GIVEREF(__pyx_t_43);
23342  PyTuple_SET_ITEM(__pyx_t_58, 39+__pyx_t_5, __pyx_t_43);
23343  __Pyx_GIVEREF(__pyx_t_44);
23344  PyTuple_SET_ITEM(__pyx_t_58, 40+__pyx_t_5, __pyx_t_44);
23345  __Pyx_GIVEREF(__pyx_t_45);
23346  PyTuple_SET_ITEM(__pyx_t_58, 41+__pyx_t_5, __pyx_t_45);
23347  __Pyx_GIVEREF(__pyx_t_46);
23348  PyTuple_SET_ITEM(__pyx_t_58, 42+__pyx_t_5, __pyx_t_46);
23349  __Pyx_GIVEREF(__pyx_t_47);
23350  PyTuple_SET_ITEM(__pyx_t_58, 43+__pyx_t_5, __pyx_t_47);
23351  __Pyx_GIVEREF(__pyx_t_48);
23352  PyTuple_SET_ITEM(__pyx_t_58, 44+__pyx_t_5, __pyx_t_48);
23353  __Pyx_GIVEREF(__pyx_t_40);
23354  PyTuple_SET_ITEM(__pyx_t_58, 45+__pyx_t_5, __pyx_t_40);
23355  __Pyx_GIVEREF(__pyx_t_49);
23356  PyTuple_SET_ITEM(__pyx_t_58, 46+__pyx_t_5, __pyx_t_49);
23357  __Pyx_GIVEREF(__pyx_t_51);
23358  PyTuple_SET_ITEM(__pyx_t_58, 47+__pyx_t_5, __pyx_t_51);
23359  __Pyx_GIVEREF(__pyx_t_52);
23360  PyTuple_SET_ITEM(__pyx_t_58, 48+__pyx_t_5, __pyx_t_52);
23361  __Pyx_GIVEREF(__pyx_t_53);
23362  PyTuple_SET_ITEM(__pyx_t_58, 49+__pyx_t_5, __pyx_t_53);
23363  __Pyx_GIVEREF(__pyx_t_54);
23364  PyTuple_SET_ITEM(__pyx_t_58, 50+__pyx_t_5, __pyx_t_54);
23365  __Pyx_GIVEREF(__pyx_t_55);
23366  PyTuple_SET_ITEM(__pyx_t_58, 51+__pyx_t_5, __pyx_t_55);
23367  __Pyx_GIVEREF(__pyx_t_56);
23368  PyTuple_SET_ITEM(__pyx_t_58, 52+__pyx_t_5, __pyx_t_56);
23369  __Pyx_GIVEREF(__pyx_t_57);
23370  PyTuple_SET_ITEM(__pyx_t_58, 53+__pyx_t_5, __pyx_t_57);
23371  __pyx_t_3 = 0;
23372  __pyx_t_2 = 0;
23373  __pyx_t_7 = 0;
23374  __pyx_t_8 = 0;
23375  __pyx_t_9 = 0;
23376  __pyx_t_10 = 0;
23377  __pyx_t_11 = 0;
23378  __pyx_t_12 = 0;
23379  __pyx_t_13 = 0;
23380  __pyx_t_14 = 0;
23381  __pyx_t_15 = 0;
23382  __pyx_t_16 = 0;
23383  __pyx_t_17 = 0;
23384  __pyx_t_18 = 0;
23385  __pyx_t_19 = 0;
23386  __pyx_t_4 = 0;
23387  __pyx_t_20 = 0;
23388  __pyx_t_22 = 0;
23389  __pyx_t_23 = 0;
23390  __pyx_t_24 = 0;
23391  __pyx_t_25 = 0;
23392  __pyx_t_26 = 0;
23393  __pyx_t_21 = 0;
23394  __pyx_t_27 = 0;
23395  __pyx_t_29 = 0;
23396  __pyx_t_28 = 0;
23397  __pyx_t_30 = 0;
23398  __pyx_t_32 = 0;
23399  __pyx_t_33 = 0;
23400  __pyx_t_34 = 0;
23401  __pyx_t_35 = 0;
23402  __pyx_t_36 = 0;
23403  __pyx_t_37 = 0;
23404  __pyx_t_38 = 0;
23405  __pyx_t_31 = 0;
23406  __pyx_t_39 = 0;
23407  __pyx_t_41 = 0;
23408  __pyx_t_42 = 0;
23409  __pyx_t_43 = 0;
23410  __pyx_t_44 = 0;
23411  __pyx_t_45 = 0;
23412  __pyx_t_46 = 0;
23413  __pyx_t_47 = 0;
23414  __pyx_t_48 = 0;
23415  __pyx_t_40 = 0;
23416  __pyx_t_49 = 0;
23417  __pyx_t_51 = 0;
23418  __pyx_t_52 = 0;
23419  __pyx_t_53 = 0;
23420  __pyx_t_54 = 0;
23421  __pyx_t_55 = 0;
23422  __pyx_t_56 = 0;
23423  __pyx_t_57 = 0;
23424  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1013, __pyx_L1_error)
23425  __Pyx_GOTREF(__pyx_t_1);
23426  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
23427  }
23428  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23429  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23430 
23431  /* "ADR.pyx":1069
23432  * self.ebqe['penalty'],
23433  * self.numericalFlux.boundaryAdjoint_sigma)
23434  * log("Jacobian ",level=10,data=jacobian) # <<<<<<<<<<<<<<
23435  * #mwf decide if this is reasonable for solver statistics
23436  * self.nonlinear_function_jacobian_evaluations += 1
23437  */
23438  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1069, __pyx_L1_error)
23439  __Pyx_GOTREF(__pyx_t_1);
23440  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1069, __pyx_L1_error)
23441  __Pyx_GOTREF(__pyx_t_6);
23442  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_level, __pyx_int_10) < 0) __PYX_ERR(1, 1069, __pyx_L1_error)
23443  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_jacobian) < 0) __PYX_ERR(1, 1069, __pyx_L1_error)
23444  __pyx_t_58 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__30, __pyx_t_6); if (unlikely(!__pyx_t_58)) __PYX_ERR(1, 1069, __pyx_L1_error)
23445  __Pyx_GOTREF(__pyx_t_58);
23446  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23447  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23448  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
23449 
23450  /* "ADR.pyx":1071
23451  * log("Jacobian ",level=10,data=jacobian)
23452  * #mwf decide if this is reasonable for solver statistics
23453  * self.nonlinear_function_jacobian_evaluations += 1 # <<<<<<<<<<<<<<
23454  * return jacobian
23455  * def calculateElementQuadrature(self):
23456  */
23457  __pyx_t_58 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_jacobian_eval); if (unlikely(!__pyx_t_58)) __PYX_ERR(1, 1071, __pyx_L1_error)
23458  __Pyx_GOTREF(__pyx_t_58);
23459  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_58, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1071, __pyx_L1_error)
23460  __Pyx_GOTREF(__pyx_t_6);
23461  __Pyx_DECREF(__pyx_t_58); __pyx_t_58 = 0;
23462  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_function_jacobian_eval, __pyx_t_6) < 0) __PYX_ERR(1, 1071, __pyx_L1_error)
23463  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
23464 
23465  /* "ADR.pyx":1072
23466  * #mwf decide if this is reasonable for solver statistics
23467  * self.nonlinear_function_jacobian_evaluations += 1
23468  * return jacobian # <<<<<<<<<<<<<<
23469  * def calculateElementQuadrature(self):
23470  * """
23471  */
23472  __Pyx_XDECREF(__pyx_r);
23473  __Pyx_INCREF(__pyx_v_jacobian);
23474  __pyx_r = __pyx_v_jacobian;
23475  goto __pyx_L0;
23476 
23477  /* "ADR.pyx":1008
23478  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
23479  * self.nonlinear_function_evaluations += 1
23480  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
23481  * #import superluWrappers
23482  * #import numpy
23483  */
23484 
23485  /* function exit code */
23486  __pyx_L1_error:;
23487  __Pyx_XDECREF(__pyx_t_1);
23488  __Pyx_XDECREF(__pyx_t_2);
23489  __Pyx_XDECREF(__pyx_t_3);
23490  __Pyx_XDECREF(__pyx_t_4);
23491  __Pyx_XDECREF(__pyx_t_6);
23492  __Pyx_XDECREF(__pyx_t_7);
23493  __Pyx_XDECREF(__pyx_t_8);
23494  __Pyx_XDECREF(__pyx_t_9);
23495  __Pyx_XDECREF(__pyx_t_10);
23496  __Pyx_XDECREF(__pyx_t_11);
23497  __Pyx_XDECREF(__pyx_t_12);
23498  __Pyx_XDECREF(__pyx_t_13);
23499  __Pyx_XDECREF(__pyx_t_14);
23500  __Pyx_XDECREF(__pyx_t_15);
23501  __Pyx_XDECREF(__pyx_t_16);
23502  __Pyx_XDECREF(__pyx_t_17);
23503  __Pyx_XDECREF(__pyx_t_18);
23504  __Pyx_XDECREF(__pyx_t_19);
23505  __Pyx_XDECREF(__pyx_t_20);
23506  __Pyx_XDECREF(__pyx_t_21);
23507  __Pyx_XDECREF(__pyx_t_22);
23508  __Pyx_XDECREF(__pyx_t_23);
23509  __Pyx_XDECREF(__pyx_t_24);
23510  __Pyx_XDECREF(__pyx_t_25);
23511  __Pyx_XDECREF(__pyx_t_26);
23512  __Pyx_XDECREF(__pyx_t_27);
23513  __Pyx_XDECREF(__pyx_t_28);
23514  __Pyx_XDECREF(__pyx_t_29);
23515  __Pyx_XDECREF(__pyx_t_30);
23516  __Pyx_XDECREF(__pyx_t_31);
23517  __Pyx_XDECREF(__pyx_t_32);
23518  __Pyx_XDECREF(__pyx_t_33);
23519  __Pyx_XDECREF(__pyx_t_34);
23520  __Pyx_XDECREF(__pyx_t_35);
23521  __Pyx_XDECREF(__pyx_t_36);
23522  __Pyx_XDECREF(__pyx_t_37);
23523  __Pyx_XDECREF(__pyx_t_38);
23524  __Pyx_XDECREF(__pyx_t_39);
23525  __Pyx_XDECREF(__pyx_t_40);
23526  __Pyx_XDECREF(__pyx_t_41);
23527  __Pyx_XDECREF(__pyx_t_42);
23528  __Pyx_XDECREF(__pyx_t_43);
23529  __Pyx_XDECREF(__pyx_t_44);
23530  __Pyx_XDECREF(__pyx_t_45);
23531  __Pyx_XDECREF(__pyx_t_46);
23532  __Pyx_XDECREF(__pyx_t_47);
23533  __Pyx_XDECREF(__pyx_t_48);
23534  __Pyx_XDECREF(__pyx_t_49);
23535  __Pyx_XDECREF(__pyx_t_50);
23536  __Pyx_XDECREF(__pyx_t_51);
23537  __Pyx_XDECREF(__pyx_t_52);
23538  __Pyx_XDECREF(__pyx_t_53);
23539  __Pyx_XDECREF(__pyx_t_54);
23540  __Pyx_XDECREF(__pyx_t_55);
23541  __Pyx_XDECREF(__pyx_t_56);
23542  __Pyx_XDECREF(__pyx_t_57);
23543  __Pyx_XDECREF(__pyx_t_58);
23544  __Pyx_AddTraceback("ADR.LevelModel.getJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
23545  __pyx_r = NULL;
23546  __pyx_L0:;
23547  __Pyx_XDECREF(__pyx_v_pdb);
23548  __Pyx_XGIVEREF(__pyx_r);
23549  __Pyx_RefNannyFinishContext();
23550  return __pyx_r;
23551 }
23552 
23553 /* "ADR.pyx":1073
23554  * self.nonlinear_function_jacobian_evaluations += 1
23555  * return jacobian
23556  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
23557  * """
23558  * Calculate the physical location and weights of the quadrature rules
23559  */
23560 
23561 /* Python wrapper */
23562 static PyObject *__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
23563 static char __pyx_doc_3ADR_10LevelModel_8calculateElementQuadrature[] = "\n Calculate the physical location and weights of the quadrature rules\n and the shape information at the quadrature points.\n\n This function should be called only when the mesh changes.\n ";
23564 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_9calculateElementQuadrature = {"calculateElementQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature, METH_O, __pyx_doc_3ADR_10LevelModel_8calculateElementQuadrature};
23565 static PyObject *__pyx_pw_3ADR_10LevelModel_9calculateElementQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
23566  PyObject *__pyx_r = 0;
23567  __Pyx_RefNannyDeclarations
23568  __Pyx_RefNannySetupContext("calculateElementQuadrature (wrapper)", 0);
23569  __pyx_r = __pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
23570 
23571  /* function exit code */
23572  __Pyx_RefNannyFinishContext();
23573  return __pyx_r;
23574 }
23575 
23576 static PyObject *__pyx_pf_3ADR_10LevelModel_8calculateElementQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
23577  PyObject *__pyx_r = NULL;
23578  __Pyx_RefNannyDeclarations
23579  PyObject *__pyx_t_1 = NULL;
23580  PyObject *__pyx_t_2 = NULL;
23581  PyObject *__pyx_t_3 = NULL;
23582  PyObject *__pyx_t_4 = NULL;
23583  PyObject *__pyx_t_5 = NULL;
23584  int __pyx_t_6;
23585  PyObject *__pyx_t_7 = NULL;
23586  int __pyx_t_8;
23587  int __pyx_t_9;
23588  PyObject *__pyx_t_10 = NULL;
23589  __Pyx_RefNannySetupContext("calculateElementQuadrature", 0);
23590 
23591  /* "ADR.pyx":1080
23592  * This function should be called only when the mesh changes.
23593  * """
23594  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints, # <<<<<<<<<<<<<<
23595  * self.q['x'])
23596  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
23597  */
23598  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1080, __pyx_L1_error)
23599  __Pyx_GOTREF(__pyx_t_2);
23600  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1080, __pyx_L1_error)
23601  __Pyx_GOTREF(__pyx_t_3);
23602  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23603  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1080, __pyx_L1_error)
23604  __Pyx_GOTREF(__pyx_t_2);
23605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23606  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1080, __pyx_L1_error)
23607  __Pyx_GOTREF(__pyx_t_3);
23608  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23609  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1080, __pyx_L1_error)
23610  __Pyx_GOTREF(__pyx_t_2);
23611  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23612  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1080, __pyx_L1_error)
23613  __Pyx_GOTREF(__pyx_t_3);
23614 
23615  /* "ADR.pyx":1081
23616  * """
23617  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints,
23618  * self.q['x']) # <<<<<<<<<<<<<<
23619  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
23620  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
23621  */
23622  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1081, __pyx_L1_error)
23623  __Pyx_GOTREF(__pyx_t_4);
23624  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1081, __pyx_L1_error)
23625  __Pyx_GOTREF(__pyx_t_5);
23626  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23627  __pyx_t_4 = NULL;
23628  __pyx_t_6 = 0;
23629  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
23630  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23631  if (likely(__pyx_t_4)) {
23632  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23633  __Pyx_INCREF(__pyx_t_4);
23634  __Pyx_INCREF(function);
23635  __Pyx_DECREF_SET(__pyx_t_2, function);
23636  __pyx_t_6 = 1;
23637  }
23638  }
23639  #if CYTHON_FAST_PYCALL
23640  if (PyFunction_Check(__pyx_t_2)) {
23641  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
23642  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1080, __pyx_L1_error)
23643  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23644  __Pyx_GOTREF(__pyx_t_1);
23645  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23646  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23647  } else
23648  #endif
23649  #if CYTHON_FAST_PYCCALL
23650  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
23651  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
23652  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1080, __pyx_L1_error)
23653  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23654  __Pyx_GOTREF(__pyx_t_1);
23655  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23656  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23657  } else
23658  #endif
23659  {
23660  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1080, __pyx_L1_error)
23661  __Pyx_GOTREF(__pyx_t_7);
23662  if (__pyx_t_4) {
23663  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
23664  }
23665  __Pyx_GIVEREF(__pyx_t_3);
23666  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
23667  __Pyx_GIVEREF(__pyx_t_5);
23668  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
23669  __pyx_t_3 = 0;
23670  __pyx_t_5 = 0;
23671  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1080, __pyx_L1_error)
23672  __Pyx_GOTREF(__pyx_t_1);
23673  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23674  }
23675  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23676  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23677 
23678  /* "ADR.pyx":1082
23679  * self.u[0].femSpace.elementMaps.getValues(self.elementQuadraturePoints,
23680  * self.q['x'])
23681  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
23682  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
23683  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
23684  */
23685  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1082, __pyx_L1_error)
23686  __Pyx_GOTREF(__pyx_t_2);
23687  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1082, __pyx_L1_error)
23688  __Pyx_GOTREF(__pyx_t_7);
23689  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23690  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1082, __pyx_L1_error)
23691  __Pyx_GOTREF(__pyx_t_2);
23692  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23693  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1082, __pyx_L1_error)
23694  __Pyx_GOTREF(__pyx_t_7);
23695  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23696  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_getBasisValuesRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1082, __pyx_L1_error)
23697  __Pyx_GOTREF(__pyx_t_2);
23698  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23699  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1082, __pyx_L1_error)
23700  __Pyx_GOTREF(__pyx_t_7);
23701  __pyx_t_5 = NULL;
23702  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
23703  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
23704  if (likely(__pyx_t_5)) {
23705  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23706  __Pyx_INCREF(__pyx_t_5);
23707  __Pyx_INCREF(function);
23708  __Pyx_DECREF_SET(__pyx_t_2, function);
23709  }
23710  }
23711  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
23712  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23713  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23714  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1082, __pyx_L1_error)
23715  __Pyx_GOTREF(__pyx_t_1);
23716  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23717  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23718 
23719  /* "ADR.pyx":1083
23720  * self.q['x'])
23721  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
23722  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
23723  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
23724  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
23725  */
23726  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1083, __pyx_L1_error)
23727  __Pyx_GOTREF(__pyx_t_2);
23728  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1083, __pyx_L1_error)
23729  __Pyx_GOTREF(__pyx_t_7);
23730  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23731  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1083, __pyx_L1_error)
23732  __Pyx_GOTREF(__pyx_t_2);
23733  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23734  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1083, __pyx_L1_error)
23735  __Pyx_GOTREF(__pyx_t_7);
23736  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23737  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_getBasisGradientValuesRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1083, __pyx_L1_error)
23738  __Pyx_GOTREF(__pyx_t_2);
23739  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23740  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1083, __pyx_L1_error)
23741  __Pyx_GOTREF(__pyx_t_7);
23742  __pyx_t_5 = NULL;
23743  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
23744  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
23745  if (likely(__pyx_t_5)) {
23746  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23747  __Pyx_INCREF(__pyx_t_5);
23748  __Pyx_INCREF(function);
23749  __Pyx_DECREF_SET(__pyx_t_2, function);
23750  }
23751  }
23752  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
23753  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23754  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23755  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1083, __pyx_L1_error)
23756  __Pyx_GOTREF(__pyx_t_1);
23757  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23758  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23759 
23760  /* "ADR.pyx":1084
23761  * self.u[0].femSpace.elementMaps.getBasisValuesRef(self.elementQuadraturePoints)
23762  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
23763  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
23764  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
23765  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
23766  */
23767  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1084, __pyx_L1_error)
23768  __Pyx_GOTREF(__pyx_t_2);
23769  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1084, __pyx_L1_error)
23770  __Pyx_GOTREF(__pyx_t_7);
23771  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23772  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1084, __pyx_L1_error)
23773  __Pyx_GOTREF(__pyx_t_2);
23774  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23775  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getBasisValuesRef); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1084, __pyx_L1_error)
23776  __Pyx_GOTREF(__pyx_t_7);
23777  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23778  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1084, __pyx_L1_error)
23779  __Pyx_GOTREF(__pyx_t_2);
23780  __pyx_t_5 = NULL;
23781  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
23782  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
23783  if (likely(__pyx_t_5)) {
23784  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
23785  __Pyx_INCREF(__pyx_t_5);
23786  __Pyx_INCREF(function);
23787  __Pyx_DECREF_SET(__pyx_t_7, function);
23788  }
23789  }
23790  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2);
23791  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23792  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23793  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
23794  __Pyx_GOTREF(__pyx_t_1);
23795  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23796  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23797 
23798  /* "ADR.pyx":1085
23799  * self.u[0].femSpace.elementMaps.getBasisGradientValuesRef(self.elementQuadraturePoints)
23800  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
23801  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints) # <<<<<<<<<<<<<<
23802  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
23803  * if self.stabilization is not None:
23804  */
23805  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1085, __pyx_L1_error)
23806  __Pyx_GOTREF(__pyx_t_7);
23807  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1085, __pyx_L1_error)
23808  __Pyx_GOTREF(__pyx_t_2);
23809  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23810  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1085, __pyx_L1_error)
23811  __Pyx_GOTREF(__pyx_t_7);
23812  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23813  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_getBasisGradientValuesRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1085, __pyx_L1_error)
23814  __Pyx_GOTREF(__pyx_t_2);
23815  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23816  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementQuadraturePoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1085, __pyx_L1_error)
23817  __Pyx_GOTREF(__pyx_t_7);
23818  __pyx_t_5 = NULL;
23819  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
23820  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
23821  if (likely(__pyx_t_5)) {
23822  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23823  __Pyx_INCREF(__pyx_t_5);
23824  __Pyx_INCREF(function);
23825  __Pyx_DECREF_SET(__pyx_t_2, function);
23826  }
23827  }
23828  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
23829  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23830  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23831  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1085, __pyx_L1_error)
23832  __Pyx_GOTREF(__pyx_t_1);
23833  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23834  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23835 
23836  /* "ADR.pyx":1086
23837  * self.u[0].femSpace.getBasisValuesRef(self.elementQuadraturePoints)
23838  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
23839  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
23840  * if self.stabilization is not None:
23841  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
23842  */
23843  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1086, __pyx_L1_error)
23844  __Pyx_GOTREF(__pyx_t_2);
23845  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1086, __pyx_L1_error)
23846  __Pyx_GOTREF(__pyx_t_7);
23847  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23848  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1086, __pyx_L1_error)
23849  __Pyx_GOTREF(__pyx_t_2);
23850  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1086, __pyx_L1_error)
23851  __Pyx_GOTREF(__pyx_t_5);
23852  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23853  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1086, __pyx_L1_error)
23854  __Pyx_GOTREF(__pyx_t_2);
23855  __pyx_t_3 = NULL;
23856  __pyx_t_6 = 0;
23857  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
23858  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
23859  if (likely(__pyx_t_3)) {
23860  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
23861  __Pyx_INCREF(__pyx_t_3);
23862  __Pyx_INCREF(function);
23863  __Pyx_DECREF_SET(__pyx_t_7, function);
23864  __pyx_t_6 = 1;
23865  }
23866  }
23867  #if CYTHON_FAST_PYCALL
23868  if (PyFunction_Check(__pyx_t_7)) {
23869  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_2};
23870  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1086, __pyx_L1_error)
23871  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
23872  __Pyx_GOTREF(__pyx_t_1);
23873  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23874  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23875  } else
23876  #endif
23877  #if CYTHON_FAST_PYCCALL
23878  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
23879  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_2};
23880  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1086, __pyx_L1_error)
23881  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
23882  __Pyx_GOTREF(__pyx_t_1);
23883  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23884  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23885  } else
23886  #endif
23887  {
23888  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1086, __pyx_L1_error)
23889  __Pyx_GOTREF(__pyx_t_4);
23890  if (__pyx_t_3) {
23891  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
23892  }
23893  __Pyx_GIVEREF(__pyx_t_5);
23894  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_5);
23895  __Pyx_GIVEREF(__pyx_t_2);
23896  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_2);
23897  __pyx_t_5 = 0;
23898  __pyx_t_2 = 0;
23899  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1086, __pyx_L1_error)
23900  __Pyx_GOTREF(__pyx_t_1);
23901  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23902  }
23903  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23904  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23905 
23906  /* "ADR.pyx":1087
23907  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
23908  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
23909  * if self.stabilization is not None: # <<<<<<<<<<<<<<
23910  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
23911  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
23912  */
23913  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1087, __pyx_L1_error)
23914  __Pyx_GOTREF(__pyx_t_1);
23915  __pyx_t_8 = (__pyx_t_1 != Py_None);
23916  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23917  __pyx_t_9 = (__pyx_t_8 != 0);
23918  if (__pyx_t_9) {
23919 
23920  /* "ADR.pyx":1088
23921  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
23922  * if self.stabilization is not None:
23923  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
23924  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
23925  * if self.shockCapturing is not None:
23926  */
23927  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1088, __pyx_L1_error)
23928  __Pyx_GOTREF(__pyx_t_7);
23929  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1088, __pyx_L1_error)
23930  __Pyx_GOTREF(__pyx_t_4);
23931  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23932  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1088, __pyx_L1_error)
23933  __Pyx_GOTREF(__pyx_t_7);
23934  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1088, __pyx_L1_error)
23935  __Pyx_GOTREF(__pyx_t_2);
23936  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1088, __pyx_L1_error)
23937  __Pyx_GOTREF(__pyx_t_5);
23938  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23939  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1088, __pyx_L1_error)
23940  __Pyx_GOTREF(__pyx_t_2);
23941  __pyx_t_3 = NULL;
23942  __pyx_t_6 = 0;
23943  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
23944  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
23945  if (likely(__pyx_t_3)) {
23946  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23947  __Pyx_INCREF(__pyx_t_3);
23948  __Pyx_INCREF(function);
23949  __Pyx_DECREF_SET(__pyx_t_4, function);
23950  __pyx_t_6 = 1;
23951  }
23952  }
23953  #if CYTHON_FAST_PYCALL
23954  if (PyFunction_Check(__pyx_t_4)) {
23955  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_5, __pyx_t_2};
23956  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1088, __pyx_L1_error)
23957  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
23958  __Pyx_GOTREF(__pyx_t_1);
23959  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23960  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23961  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23962  } else
23963  #endif
23964  #if CYTHON_FAST_PYCCALL
23965  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
23966  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_5, __pyx_t_2};
23967  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1088, __pyx_L1_error)
23968  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
23969  __Pyx_GOTREF(__pyx_t_1);
23970  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23971  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23972  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23973  } else
23974  #endif
23975  {
23976  __pyx_t_10 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1088, __pyx_L1_error)
23977  __Pyx_GOTREF(__pyx_t_10);
23978  if (__pyx_t_3) {
23979  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
23980  }
23981  __Pyx_GIVEREF(__pyx_t_7);
23982  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_t_7);
23983  __Pyx_GIVEREF(__pyx_t_5);
23984  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_5);
23985  __Pyx_GIVEREF(__pyx_t_2);
23986  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_t_2);
23987  __pyx_t_7 = 0;
23988  __pyx_t_5 = 0;
23989  __pyx_t_2 = 0;
23990  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1088, __pyx_L1_error)
23991  __Pyx_GOTREF(__pyx_t_1);
23992  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23993  }
23994  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23995  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23996 
23997  /* "ADR.pyx":1089
23998  * if self.stabilization is not None:
23999  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24000  * self.stabilization.initializeTimeIntegration(self.timeIntegration) # <<<<<<<<<<<<<<
24001  * if self.shockCapturing is not None:
24002  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24003  */
24004  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stabilization); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1089, __pyx_L1_error)
24005  __Pyx_GOTREF(__pyx_t_4);
24006  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_initializeTimeIntegration); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1089, __pyx_L1_error)
24007  __Pyx_GOTREF(__pyx_t_10);
24008  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24009  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1089, __pyx_L1_error)
24010  __Pyx_GOTREF(__pyx_t_4);
24011  __pyx_t_2 = NULL;
24012  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
24013  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
24014  if (likely(__pyx_t_2)) {
24015  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
24016  __Pyx_INCREF(__pyx_t_2);
24017  __Pyx_INCREF(function);
24018  __Pyx_DECREF_SET(__pyx_t_10, function);
24019  }
24020  }
24021  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_4);
24022  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24023  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24024  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1089, __pyx_L1_error)
24025  __Pyx_GOTREF(__pyx_t_1);
24026  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24027  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24028 
24029  /* "ADR.pyx":1087
24030  * self.u[0].femSpace.getBasisGradientValuesRef(self.elementQuadraturePoints)
24031  * self.coefficients.initializeElementQuadrature(self.timeIntegration.t,self.q)
24032  * if self.stabilization is not None: # <<<<<<<<<<<<<<
24033  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24034  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24035  */
24036  }
24037 
24038  /* "ADR.pyx":1090
24039  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24040  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24041  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
24042  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24043  * def calculateElementBoundaryQuadrature(self):
24044  */
24045  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1090, __pyx_L1_error)
24046  __Pyx_GOTREF(__pyx_t_1);
24047  __pyx_t_9 = (__pyx_t_1 != Py_None);
24048  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24049  __pyx_t_8 = (__pyx_t_9 != 0);
24050  if (__pyx_t_8) {
24051 
24052  /* "ADR.pyx":1091
24053  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24054  * if self.shockCapturing is not None:
24055  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q) # <<<<<<<<<<<<<<
24056  * def calculateElementBoundaryQuadrature(self):
24057  * pass
24058  */
24059  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shockCapturing); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1091, __pyx_L1_error)
24060  __Pyx_GOTREF(__pyx_t_10);
24061  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_initializeElementQuadrature); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1091, __pyx_L1_error)
24062  __Pyx_GOTREF(__pyx_t_4);
24063  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24064  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1091, __pyx_L1_error)
24065  __Pyx_GOTREF(__pyx_t_10);
24066  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error)
24067  __Pyx_GOTREF(__pyx_t_2);
24068  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1091, __pyx_L1_error)
24069  __Pyx_GOTREF(__pyx_t_5);
24070  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24071  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_q); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error)
24072  __Pyx_GOTREF(__pyx_t_2);
24073  __pyx_t_7 = NULL;
24074  __pyx_t_6 = 0;
24075  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
24076  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
24077  if (likely(__pyx_t_7)) {
24078  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
24079  __Pyx_INCREF(__pyx_t_7);
24080  __Pyx_INCREF(function);
24081  __Pyx_DECREF_SET(__pyx_t_4, function);
24082  __pyx_t_6 = 1;
24083  }
24084  }
24085  #if CYTHON_FAST_PYCALL
24086  if (PyFunction_Check(__pyx_t_4)) {
24087  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_10, __pyx_t_5, __pyx_t_2};
24088  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1091, __pyx_L1_error)
24089  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24090  __Pyx_GOTREF(__pyx_t_1);
24091  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24092  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24093  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24094  } else
24095  #endif
24096  #if CYTHON_FAST_PYCCALL
24097  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
24098  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_10, __pyx_t_5, __pyx_t_2};
24099  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1091, __pyx_L1_error)
24100  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24101  __Pyx_GOTREF(__pyx_t_1);
24102  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24103  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24104  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24105  } else
24106  #endif
24107  {
24108  __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1091, __pyx_L1_error)
24109  __Pyx_GOTREF(__pyx_t_3);
24110  if (__pyx_t_7) {
24111  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
24112  }
24113  __Pyx_GIVEREF(__pyx_t_10);
24114  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_t_10);
24115  __Pyx_GIVEREF(__pyx_t_5);
24116  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_5);
24117  __Pyx_GIVEREF(__pyx_t_2);
24118  PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_t_2);
24119  __pyx_t_10 = 0;
24120  __pyx_t_5 = 0;
24121  __pyx_t_2 = 0;
24122  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1091, __pyx_L1_error)
24123  __Pyx_GOTREF(__pyx_t_1);
24124  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24125  }
24126  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24127  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24128 
24129  /* "ADR.pyx":1090
24130  * self.stabilization.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24131  * self.stabilization.initializeTimeIntegration(self.timeIntegration)
24132  * if self.shockCapturing is not None: # <<<<<<<<<<<<<<
24133  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24134  * def calculateElementBoundaryQuadrature(self):
24135  */
24136  }
24137 
24138  /* "ADR.pyx":1073
24139  * self.nonlinear_function_jacobian_evaluations += 1
24140  * return jacobian
24141  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
24142  * """
24143  * Calculate the physical location and weights of the quadrature rules
24144  */
24145 
24146  /* function exit code */
24147  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24148  goto __pyx_L0;
24149  __pyx_L1_error:;
24150  __Pyx_XDECREF(__pyx_t_1);
24151  __Pyx_XDECREF(__pyx_t_2);
24152  __Pyx_XDECREF(__pyx_t_3);
24153  __Pyx_XDECREF(__pyx_t_4);
24154  __Pyx_XDECREF(__pyx_t_5);
24155  __Pyx_XDECREF(__pyx_t_7);
24156  __Pyx_XDECREF(__pyx_t_10);
24157  __Pyx_AddTraceback("ADR.LevelModel.calculateElementQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
24158  __pyx_r = NULL;
24159  __pyx_L0:;
24160  __Pyx_XGIVEREF(__pyx_r);
24161  __Pyx_RefNannyFinishContext();
24162  return __pyx_r;
24163 }
24164 
24165 /* "ADR.pyx":1092
24166  * if self.shockCapturing is not None:
24167  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
24168  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
24169  * pass
24170  * def calculateExteriorElementBoundaryQuadrature(self):
24171  */
24172 
24173 /* Python wrapper */
24174 static PyObject *__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24175 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_11calculateElementBoundaryQuadrature = {"calculateElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature, METH_O, 0};
24176 static PyObject *__pyx_pw_3ADR_10LevelModel_11calculateElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24177  PyObject *__pyx_r = 0;
24178  __Pyx_RefNannyDeclarations
24179  __Pyx_RefNannySetupContext("calculateElementBoundaryQuadrature (wrapper)", 0);
24180  __pyx_r = __pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24181 
24182  /* function exit code */
24183  __Pyx_RefNannyFinishContext();
24184  return __pyx_r;
24185 }
24186 
24187 static PyObject *__pyx_pf_3ADR_10LevelModel_10calculateElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
24188  PyObject *__pyx_r = NULL;
24189  __Pyx_RefNannyDeclarations
24190  __Pyx_RefNannySetupContext("calculateElementBoundaryQuadrature", 0);
24191 
24192  /* function exit code */
24193  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24194  __Pyx_XGIVEREF(__pyx_r);
24195  __Pyx_RefNannyFinishContext();
24196  return __pyx_r;
24197 }
24198 
24199 /* "ADR.pyx":1094
24200  * def calculateElementBoundaryQuadrature(self):
24201  * pass
24202  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
24203  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24204  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24205  */
24206 
24207 /* Python wrapper */
24208 static PyObject *__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24209 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature = {"calculateExteriorElementBoundaryQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature, METH_O, 0};
24210 static PyObject *__pyx_pw_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24211  PyObject *__pyx_r = 0;
24212  __Pyx_RefNannyDeclarations
24213  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryQuadrature (wrapper)", 0);
24214  __pyx_r = __pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24215 
24216  /* function exit code */
24217  __Pyx_RefNannyFinishContext();
24218  return __pyx_r;
24219 }
24220 
24221 static PyObject *__pyx_pf_3ADR_10LevelModel_12calculateExteriorElementBoundaryQuadrature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
24222  PyObject *__pyx_v_cj = NULL;
24223  PyObject *__pyx_r = NULL;
24224  __Pyx_RefNannyDeclarations
24225  PyObject *__pyx_t_1 = NULL;
24226  PyObject *__pyx_t_2 = NULL;
24227  PyObject *__pyx_t_3 = NULL;
24228  PyObject *__pyx_t_4 = NULL;
24229  PyObject *__pyx_t_5 = NULL;
24230  int __pyx_t_6;
24231  PyObject *__pyx_t_7 = NULL;
24232  Py_ssize_t __pyx_t_8;
24233  PyObject *(*__pyx_t_9)(PyObject *);
24234  PyObject *__pyx_t_10 = NULL;
24235  PyObject *__pyx_t_11 = NULL;
24236  PyObject *__pyx_t_12 = NULL;
24237  PyObject *__pyx_t_13 = NULL;
24238  PyObject *__pyx_t_14 = NULL;
24239  __Pyx_RefNannySetupContext("calculateExteriorElementBoundaryQuadrature", 0);
24240 
24241  /* "ADR.pyx":1095
24242  * pass
24243  * def calculateExteriorElementBoundaryQuadrature(self):
24244  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
24245  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24246  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24247  */
24248  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1095, __pyx_L1_error)
24249  __Pyx_GOTREF(__pyx_t_2);
24250  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1095, __pyx_L1_error)
24251  __Pyx_GOTREF(__pyx_t_3);
24252  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24253  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1095, __pyx_L1_error)
24254  __Pyx_GOTREF(__pyx_t_2);
24255  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24256  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1095, __pyx_L1_error)
24257  __Pyx_GOTREF(__pyx_t_3);
24258  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24259  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getBasisValuesTraceRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1095, __pyx_L1_error)
24260  __Pyx_GOTREF(__pyx_t_2);
24261  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24262  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1095, __pyx_L1_error)
24263  __Pyx_GOTREF(__pyx_t_3);
24264  __pyx_t_4 = NULL;
24265  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24266  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24267  if (likely(__pyx_t_4)) {
24268  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24269  __Pyx_INCREF(__pyx_t_4);
24270  __Pyx_INCREF(function);
24271  __Pyx_DECREF_SET(__pyx_t_2, function);
24272  }
24273  }
24274  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
24275  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24276  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24277  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1095, __pyx_L1_error)
24278  __Pyx_GOTREF(__pyx_t_1);
24279  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24280  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24281 
24282  /* "ADR.pyx":1096
24283  * def calculateExteriorElementBoundaryQuadrature(self):
24284  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24285  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
24286  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24287  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24288  */
24289  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1096, __pyx_L1_error)
24290  __Pyx_GOTREF(__pyx_t_2);
24291  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1096, __pyx_L1_error)
24292  __Pyx_GOTREF(__pyx_t_3);
24293  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24294  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1096, __pyx_L1_error)
24295  __Pyx_GOTREF(__pyx_t_2);
24296  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24297  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1096, __pyx_L1_error)
24298  __Pyx_GOTREF(__pyx_t_3);
24299  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24300  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getBasisGradientValuesTraceRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1096, __pyx_L1_error)
24301  __Pyx_GOTREF(__pyx_t_2);
24302  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24303  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1096, __pyx_L1_error)
24304  __Pyx_GOTREF(__pyx_t_3);
24305  __pyx_t_4 = NULL;
24306  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24307  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24308  if (likely(__pyx_t_4)) {
24309  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24310  __Pyx_INCREF(__pyx_t_4);
24311  __Pyx_INCREF(function);
24312  __Pyx_DECREF_SET(__pyx_t_2, function);
24313  }
24314  }
24315  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
24316  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24317  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24318  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1096, __pyx_L1_error)
24319  __Pyx_GOTREF(__pyx_t_1);
24320  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24321  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24322 
24323  /* "ADR.pyx":1097
24324  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24325  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24326  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
24327  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24328  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
24329  */
24330  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1097, __pyx_L1_error)
24331  __Pyx_GOTREF(__pyx_t_2);
24332  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1097, __pyx_L1_error)
24333  __Pyx_GOTREF(__pyx_t_3);
24334  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24335  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1097, __pyx_L1_error)
24336  __Pyx_GOTREF(__pyx_t_2);
24337  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24338  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getBasisValuesTraceRef); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1097, __pyx_L1_error)
24339  __Pyx_GOTREF(__pyx_t_3);
24340  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24341  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1097, __pyx_L1_error)
24342  __Pyx_GOTREF(__pyx_t_2);
24343  __pyx_t_4 = NULL;
24344  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24345  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
24346  if (likely(__pyx_t_4)) {
24347  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24348  __Pyx_INCREF(__pyx_t_4);
24349  __Pyx_INCREF(function);
24350  __Pyx_DECREF_SET(__pyx_t_3, function);
24351  }
24352  }
24353  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
24354  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24355  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24356  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1097, __pyx_L1_error)
24357  __Pyx_GOTREF(__pyx_t_1);
24358  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24359  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24360 
24361  /* "ADR.pyx":1098
24362  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24363  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24364  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints) # <<<<<<<<<<<<<<
24365  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
24366  * self.ebqe['x'])
24367  */
24368  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1098, __pyx_L1_error)
24369  __Pyx_GOTREF(__pyx_t_3);
24370  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1098, __pyx_L1_error)
24371  __Pyx_GOTREF(__pyx_t_2);
24372  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24373  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1098, __pyx_L1_error)
24374  __Pyx_GOTREF(__pyx_t_3);
24375  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24376  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getBasisGradientValuesTraceRef); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1098, __pyx_L1_error)
24377  __Pyx_GOTREF(__pyx_t_2);
24378  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24379  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1098, __pyx_L1_error)
24380  __Pyx_GOTREF(__pyx_t_3);
24381  __pyx_t_4 = NULL;
24382  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24383  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24384  if (likely(__pyx_t_4)) {
24385  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24386  __Pyx_INCREF(__pyx_t_4);
24387  __Pyx_INCREF(function);
24388  __Pyx_DECREF_SET(__pyx_t_2, function);
24389  }
24390  }
24391  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
24392  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24393  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24394  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1098, __pyx_L1_error)
24395  __Pyx_GOTREF(__pyx_t_1);
24396  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24397  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24398 
24399  /* "ADR.pyx":1099
24400  * self.u[0].femSpace.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24401  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24402  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints, # <<<<<<<<<<<<<<
24403  * self.ebqe['x'])
24404  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
24405  */
24406  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_u); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1099, __pyx_L1_error)
24407  __Pyx_GOTREF(__pyx_t_2);
24408  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1099, __pyx_L1_error)
24409  __Pyx_GOTREF(__pyx_t_3);
24410  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24411  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1099, __pyx_L1_error)
24412  __Pyx_GOTREF(__pyx_t_2);
24413  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24414  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1099, __pyx_L1_error)
24415  __Pyx_GOTREF(__pyx_t_3);
24416  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24417  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getValuesGlobalExteriorTrace); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1099, __pyx_L1_error)
24418  __Pyx_GOTREF(__pyx_t_2);
24419  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24420  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_elementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1099, __pyx_L1_error)
24421  __Pyx_GOTREF(__pyx_t_3);
24422 
24423  /* "ADR.pyx":1100
24424  * self.u[0].femSpace.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24425  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
24426  * self.ebqe['x']) # <<<<<<<<<<<<<<
24427  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
24428  * self.nElementBoundaryQuadraturePoints_elementBoundary,
24429  */
24430  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1100, __pyx_L1_error)
24431  __Pyx_GOTREF(__pyx_t_4);
24432  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1100, __pyx_L1_error)
24433  __Pyx_GOTREF(__pyx_t_5);
24434  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24435  __pyx_t_4 = NULL;
24436  __pyx_t_6 = 0;
24437  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
24438  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
24439  if (likely(__pyx_t_4)) {
24440  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
24441  __Pyx_INCREF(__pyx_t_4);
24442  __Pyx_INCREF(function);
24443  __Pyx_DECREF_SET(__pyx_t_2, function);
24444  __pyx_t_6 = 1;
24445  }
24446  }
24447  #if CYTHON_FAST_PYCALL
24448  if (PyFunction_Check(__pyx_t_2)) {
24449  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
24450  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1099, __pyx_L1_error)
24451  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24452  __Pyx_GOTREF(__pyx_t_1);
24453  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24454  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24455  } else
24456  #endif
24457  #if CYTHON_FAST_PYCCALL
24458  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
24459  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
24460  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1099, __pyx_L1_error)
24461  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24462  __Pyx_GOTREF(__pyx_t_1);
24463  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24464  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24465  } else
24466  #endif
24467  {
24468  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1099, __pyx_L1_error)
24469  __Pyx_GOTREF(__pyx_t_7);
24470  if (__pyx_t_4) {
24471  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
24472  }
24473  __Pyx_GIVEREF(__pyx_t_3);
24474  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
24475  __Pyx_GIVEREF(__pyx_t_5);
24476  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
24477  __pyx_t_3 = 0;
24478  __pyx_t_5 = 0;
24479  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1099, __pyx_L1_error)
24480  __Pyx_GOTREF(__pyx_t_1);
24481  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24482  }
24483  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24485 
24486  /* "ADR.pyx":1101
24487  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
24488  * self.ebqe['x'])
24489  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
24490  * self.nElementBoundaryQuadraturePoints_elementBoundary,
24491  * self.ebqe[('x')],
24492  */
24493  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1101, __pyx_L1_error)
24494  __Pyx_GOTREF(__pyx_t_1);
24495 
24496  /* "ADR.pyx":1106
24497  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
24498  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
24499  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()]) # <<<<<<<<<<<<<<
24500  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
24501  * def estimate_mt(self):
24502  */
24503  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1106, __pyx_L1_error)
24504  __Pyx_GOTREF(__pyx_t_7);
24505  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1106, __pyx_L1_error)
24506  __Pyx_GOTREF(__pyx_t_5);
24507  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24508  __pyx_t_7 = NULL;
24509  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24510  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
24511  if (likely(__pyx_t_7)) {
24512  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24513  __Pyx_INCREF(__pyx_t_7);
24514  __Pyx_INCREF(function);
24515  __Pyx_DECREF_SET(__pyx_t_5, function);
24516  }
24517  }
24518  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
24519  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24520  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1106, __pyx_L1_error)
24521  __Pyx_GOTREF(__pyx_t_2);
24522  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24523  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
24524  __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
24525  __pyx_t_9 = NULL;
24526  } else {
24527  __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1106, __pyx_L1_error)
24528  __Pyx_GOTREF(__pyx_t_5);
24529  __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1106, __pyx_L1_error)
24530  }
24531  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24532  for (;;) {
24533  if (likely(!__pyx_t_9)) {
24534  if (likely(PyList_CheckExact(__pyx_t_5))) {
24535  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
24536  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24537  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1106, __pyx_L1_error)
24538  #else
24539  __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1106, __pyx_L1_error)
24540  __Pyx_GOTREF(__pyx_t_2);
24541  #endif
24542  } else {
24543  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
24544  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24545  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(1, 1106, __pyx_L1_error)
24546  #else
24547  __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1106, __pyx_L1_error)
24548  __Pyx_GOTREF(__pyx_t_2);
24549  #endif
24550  }
24551  } else {
24552  __pyx_t_2 = __pyx_t_9(__pyx_t_5);
24553  if (unlikely(!__pyx_t_2)) {
24554  PyObject* exc_type = PyErr_Occurred();
24555  if (exc_type) {
24556  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
24557  else __PYX_ERR(1, 1106, __pyx_L1_error)
24558  }
24559  break;
24560  }
24561  __Pyx_GOTREF(__pyx_t_2);
24562  }
24563  __Pyx_XDECREF_SET(__pyx_v_cj, __pyx_t_2);
24564  __pyx_t_2 = 0;
24565 
24566  /* "ADR.pyx":1101
24567  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
24568  * self.ebqe['x'])
24569  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
24570  * self.nElementBoundaryQuadraturePoints_elementBoundary,
24571  * self.ebqe[('x')],
24572  */
24573  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_FluxBoundaryConditions); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1101, __pyx_L1_error)
24574  __Pyx_GOTREF(__pyx_t_7);
24575  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1101, __pyx_L1_error)
24576  __Pyx_GOTREF(__pyx_t_3);
24577 
24578  /* "ADR.pyx":1102
24579  * self.ebqe['x'])
24580  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
24581  * self.nElementBoundaryQuadraturePoints_elementBoundary, # <<<<<<<<<<<<<<
24582  * self.ebqe[('x')],
24583  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
24584  */
24585  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nElementBoundaryQuadraturePoints); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1102, __pyx_L1_error)
24586  __Pyx_GOTREF(__pyx_t_4);
24587 
24588  /* "ADR.pyx":1103
24589  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh,
24590  * self.nElementBoundaryQuadraturePoints_elementBoundary,
24591  * self.ebqe[('x')], # <<<<<<<<<<<<<<
24592  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
24593  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
24594  */
24595  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1103, __pyx_L1_error)
24596  __Pyx_GOTREF(__pyx_t_10);
24597  __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_x); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1103, __pyx_L1_error)
24598  __Pyx_GOTREF(__pyx_t_11);
24599  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24600 
24601  /* "ADR.pyx":1104
24602  * self.nElementBoundaryQuadraturePoints_elementBoundary,
24603  * self.ebqe[('x')],
24604  * self.advectiveFluxBoundaryConditionsSetterDict[cj], # <<<<<<<<<<<<<<
24605  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
24606  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
24607  */
24608  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_advectiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1104, __pyx_L1_error)
24609  __Pyx_GOTREF(__pyx_t_10);
24610  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_cj); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1104, __pyx_L1_error)
24611  __Pyx_GOTREF(__pyx_t_12);
24612  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24613 
24614  /* "ADR.pyx":1105
24615  * self.ebqe[('x')],
24616  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
24617  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj])) # <<<<<<<<<<<<<<
24618  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
24619  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
24620  */
24621  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_diffusiveFluxBoundaryConditionsS); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1105, __pyx_L1_error)
24622  __Pyx_GOTREF(__pyx_t_10);
24623  __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_cj); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1105, __pyx_L1_error)
24624  __Pyx_GOTREF(__pyx_t_13);
24625  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24626  __pyx_t_10 = NULL;
24627  __pyx_t_6 = 0;
24628  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
24629  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
24630  if (likely(__pyx_t_10)) {
24631  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
24632  __Pyx_INCREF(__pyx_t_10);
24633  __Pyx_INCREF(function);
24634  __Pyx_DECREF_SET(__pyx_t_7, function);
24635  __pyx_t_6 = 1;
24636  }
24637  }
24638  #if CYTHON_FAST_PYCALL
24639  if (PyFunction_Check(__pyx_t_7)) {
24640  PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_3, __pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13};
24641  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1101, __pyx_L1_error)
24642  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24643  __Pyx_GOTREF(__pyx_t_2);
24644  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24645  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24646  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
24647  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24648  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24649  } else
24650  #endif
24651  #if CYTHON_FAST_PYCCALL
24652  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
24653  PyObject *__pyx_temp[6] = {__pyx_t_10, __pyx_t_3, __pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13};
24654  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1101, __pyx_L1_error)
24655  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24656  __Pyx_GOTREF(__pyx_t_2);
24657  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24658  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24659  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
24660  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24661  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24662  } else
24663  #endif
24664  {
24665  __pyx_t_14 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 1101, __pyx_L1_error)
24666  __Pyx_GOTREF(__pyx_t_14);
24667  if (__pyx_t_10) {
24668  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
24669  }
24670  __Pyx_GIVEREF(__pyx_t_3);
24671  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_6, __pyx_t_3);
24672  __Pyx_GIVEREF(__pyx_t_4);
24673  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_6, __pyx_t_4);
24674  __Pyx_GIVEREF(__pyx_t_11);
24675  PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_6, __pyx_t_11);
24676  __Pyx_GIVEREF(__pyx_t_12);
24677  PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_6, __pyx_t_12);
24678  __Pyx_GIVEREF(__pyx_t_13);
24679  PyTuple_SET_ITEM(__pyx_t_14, 4+__pyx_t_6, __pyx_t_13);
24680  __pyx_t_3 = 0;
24681  __pyx_t_4 = 0;
24682  __pyx_t_11 = 0;
24683  __pyx_t_12 = 0;
24684  __pyx_t_13 = 0;
24685  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1101, __pyx_L1_error)
24686  __Pyx_GOTREF(__pyx_t_2);
24687  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
24688  }
24689  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24690 
24691  /* "ADR.pyx":1101
24692  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
24693  * self.ebqe['x'])
24694  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
24695  * self.nElementBoundaryQuadraturePoints_elementBoundary,
24696  * self.ebqe[('x')],
24697  */
24698  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1101, __pyx_L1_error)
24699  __Pyx_GOTREF(__pyx_t_7);
24700  __Pyx_INCREF(__pyx_v_cj);
24701  __Pyx_GIVEREF(__pyx_v_cj);
24702  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_cj);
24703  __Pyx_GIVEREF(__pyx_t_2);
24704  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
24705  __pyx_t_2 = 0;
24706  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(1, 1101, __pyx_L1_error)
24707  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24708 
24709  /* "ADR.pyx":1106
24710  * self.advectiveFluxBoundaryConditionsSetterDict[cj],
24711  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
24712  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()]) # <<<<<<<<<<<<<<
24713  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
24714  * def estimate_mt(self):
24715  */
24716  }
24717  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24718 
24719  /* "ADR.pyx":1101
24720  * self.u[0].femSpace.elementMaps.getValuesGlobalExteriorTrace(self.elementBoundaryQuadraturePoints,
24721  * self.ebqe['x'])
24722  * self.fluxBoundaryConditionsObjectsDict = dict([(cj,FluxBoundaryConditions(self.mesh, # <<<<<<<<<<<<<<
24723  * self.nElementBoundaryQuadraturePoints_elementBoundary,
24724  * self.ebqe[('x')],
24725  */
24726  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1101, __pyx_L1_error)
24727  __Pyx_GOTREF(__pyx_t_5);
24728  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24729  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fluxBoundaryConditionsObjectsDic, __pyx_t_5) < 0) __PYX_ERR(1, 1101, __pyx_L1_error)
24730  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24731 
24732  /* "ADR.pyx":1107
24733  * self.diffusiveFluxBoundaryConditionsSetterDictDict[cj]))
24734  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
24735  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe) # <<<<<<<<<<<<<<
24736  * def estimate_mt(self):
24737  * pass
24738  */
24739  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1107, __pyx_L1_error)
24740  __Pyx_GOTREF(__pyx_t_1);
24741  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_initializeGlobalExteriorElementB); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1107, __pyx_L1_error)
24742  __Pyx_GOTREF(__pyx_t_7);
24743  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24744  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timeIntegration); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1107, __pyx_L1_error)
24745  __Pyx_GOTREF(__pyx_t_1);
24746  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1107, __pyx_L1_error)
24747  __Pyx_GOTREF(__pyx_t_2);
24748  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24749  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ebqe); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1107, __pyx_L1_error)
24750  __Pyx_GOTREF(__pyx_t_1);
24751  __pyx_t_14 = NULL;
24752  __pyx_t_6 = 0;
24753  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
24754  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
24755  if (likely(__pyx_t_14)) {
24756  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
24757  __Pyx_INCREF(__pyx_t_14);
24758  __Pyx_INCREF(function);
24759  __Pyx_DECREF_SET(__pyx_t_7, function);
24760  __pyx_t_6 = 1;
24761  }
24762  }
24763  #if CYTHON_FAST_PYCALL
24764  if (PyFunction_Check(__pyx_t_7)) {
24765  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_t_1};
24766  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1107, __pyx_L1_error)
24767  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
24768  __Pyx_GOTREF(__pyx_t_5);
24769  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24770  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24771  } else
24772  #endif
24773  #if CYTHON_FAST_PYCCALL
24774  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
24775  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_2, __pyx_t_1};
24776  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1107, __pyx_L1_error)
24777  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
24778  __Pyx_GOTREF(__pyx_t_5);
24779  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24780  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24781  } else
24782  #endif
24783  {
24784  __pyx_t_13 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 1107, __pyx_L1_error)
24785  __Pyx_GOTREF(__pyx_t_13);
24786  if (__pyx_t_14) {
24787  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL;
24788  }
24789  __Pyx_GIVEREF(__pyx_t_2);
24790  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_t_2);
24791  __Pyx_GIVEREF(__pyx_t_1);
24792  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_t_1);
24793  __pyx_t_2 = 0;
24794  __pyx_t_1 = 0;
24795  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1107, __pyx_L1_error)
24796  __Pyx_GOTREF(__pyx_t_5);
24797  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
24798  }
24799  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24800  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24801 
24802  /* "ADR.pyx":1094
24803  * def calculateElementBoundaryQuadrature(self):
24804  * pass
24805  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
24806  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
24807  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
24808  */
24809 
24810  /* function exit code */
24811  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24812  goto __pyx_L0;
24813  __pyx_L1_error:;
24814  __Pyx_XDECREF(__pyx_t_1);
24815  __Pyx_XDECREF(__pyx_t_2);
24816  __Pyx_XDECREF(__pyx_t_3);
24817  __Pyx_XDECREF(__pyx_t_4);
24818  __Pyx_XDECREF(__pyx_t_5);
24819  __Pyx_XDECREF(__pyx_t_7);
24820  __Pyx_XDECREF(__pyx_t_10);
24821  __Pyx_XDECREF(__pyx_t_11);
24822  __Pyx_XDECREF(__pyx_t_12);
24823  __Pyx_XDECREF(__pyx_t_13);
24824  __Pyx_XDECREF(__pyx_t_14);
24825  __Pyx_AddTraceback("ADR.LevelModel.calculateExteriorElementBoundaryQuadrature", __pyx_clineno, __pyx_lineno, __pyx_filename);
24826  __pyx_r = NULL;
24827  __pyx_L0:;
24828  __Pyx_XDECREF(__pyx_v_cj);
24829  __Pyx_XGIVEREF(__pyx_r);
24830  __Pyx_RefNannyFinishContext();
24831  return __pyx_r;
24832 }
24833 
24834 /* "ADR.pyx":1108
24835  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
24836  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
24837  * def estimate_mt(self): # <<<<<<<<<<<<<<
24838  * pass
24839  * def calculateAuxiliaryQuantitiesAfterStep(self):
24840  */
24841 
24842 /* Python wrapper */
24843 static PyObject *__pyx_pw_3ADR_10LevelModel_15estimate_mt(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24844 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_15estimate_mt = {"estimate_mt", (PyCFunction)__pyx_pw_3ADR_10LevelModel_15estimate_mt, METH_O, 0};
24845 static PyObject *__pyx_pw_3ADR_10LevelModel_15estimate_mt(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24846  PyObject *__pyx_r = 0;
24847  __Pyx_RefNannyDeclarations
24848  __Pyx_RefNannySetupContext("estimate_mt (wrapper)", 0);
24849  __pyx_r = __pyx_pf_3ADR_10LevelModel_14estimate_mt(__pyx_self, ((PyObject *)__pyx_v_self));
24850 
24851  /* function exit code */
24852  __Pyx_RefNannyFinishContext();
24853  return __pyx_r;
24854 }
24855 
24856 static PyObject *__pyx_pf_3ADR_10LevelModel_14estimate_mt(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
24857  PyObject *__pyx_r = NULL;
24858  __Pyx_RefNannyDeclarations
24859  __Pyx_RefNannySetupContext("estimate_mt", 0);
24860 
24861  /* function exit code */
24862  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24863  __Pyx_XGIVEREF(__pyx_r);
24864  __Pyx_RefNannyFinishContext();
24865  return __pyx_r;
24866 }
24867 
24868 /* "ADR.pyx":1110
24869  * def estimate_mt(self):
24870  * pass
24871  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
24872  * pass
24873  * def calculateSolutionAtQuadrature(self):
24874  */
24875 
24876 /* Python wrapper */
24877 static PyObject *__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24878 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep = {"calculateAuxiliaryQuantitiesAfterStep", (PyCFunction)__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep, METH_O, 0};
24879 static PyObject *__pyx_pw_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24880  PyObject *__pyx_r = 0;
24881  __Pyx_RefNannyDeclarations
24882  __Pyx_RefNannySetupContext("calculateAuxiliaryQuantitiesAfterStep (wrapper)", 0);
24883  __pyx_r = __pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(__pyx_self, ((PyObject *)__pyx_v_self));
24884 
24885  /* function exit code */
24886  __Pyx_RefNannyFinishContext();
24887  return __pyx_r;
24888 }
24889 
24890 static PyObject *__pyx_pf_3ADR_10LevelModel_16calculateAuxiliaryQuantitiesAfterStep(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
24891  PyObject *__pyx_r = NULL;
24892  __Pyx_RefNannyDeclarations
24893  __Pyx_RefNannySetupContext("calculateAuxiliaryQuantitiesAfterStep", 0);
24894 
24895  /* function exit code */
24896  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24897  __Pyx_XGIVEREF(__pyx_r);
24898  __Pyx_RefNannyFinishContext();
24899  return __pyx_r;
24900 }
24901 
24902 /* "ADR.pyx":1112
24903  * def calculateAuxiliaryQuantitiesAfterStep(self):
24904  * pass
24905  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
24906  * pass
24907  */
24908 
24909 /* Python wrapper */
24910 static PyObject *__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
24911 static PyMethodDef __pyx_mdef_3ADR_10LevelModel_19calculateSolutionAtQuadrature = {"calculateSolutionAtQuadrature", (PyCFunction)__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature, METH_O, 0};
24912 static PyObject *__pyx_pw_3ADR_10LevelModel_19calculateSolutionAtQuadrature(PyObject *__pyx_self, PyObject *__pyx_v_self) {
24913  PyObject *__pyx_r = 0;
24914  __Pyx_RefNannyDeclarations
24915  __Pyx_RefNannySetupContext("calculateSolutionAtQuadrature (wrapper)", 0);
24916  __pyx_r = __pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(__pyx_self, ((PyObject *)__pyx_v_self));
24917 
24918  /* function exit code */
24919  __Pyx_RefNannyFinishContext();
24920  return __pyx_r;
24921 }
24922 
24923 static PyObject *__pyx_pf_3ADR_10LevelModel_18calculateSolutionAtQuadrature(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
24924  PyObject *__pyx_r = NULL;
24925  __Pyx_RefNannyDeclarations
24926  __Pyx_RefNannySetupContext("calculateSolutionAtQuadrature", 0);
24927 
24928  /* function exit code */
24929  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24930  __Pyx_XGIVEREF(__pyx_r);
24931  __Pyx_RefNannyFinishContext();
24932  return __pyx_r;
24933 }
24934 
24935 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
24936  * # experimental exception made for __getbuffer__ and __releasebuffer__
24937  * # -- the details of this may change.
24938  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
24939  * # This implementation of getbuffer is geared towards Cython
24940  * # requirements, and does not yet fulfill the PEP.
24941  */
24942 
24943 /* Python wrapper */
24944 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
24945 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
24946  int __pyx_r;
24947  __Pyx_RefNannyDeclarations
24948  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
24949  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
24950 
24951  /* function exit code */
24952  __Pyx_RefNannyFinishContext();
24953  return __pyx_r;
24954 }
24955 
24956 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
24957  int __pyx_v_i;
24958  int __pyx_v_ndim;
24959  int __pyx_v_endian_detector;
24960  int __pyx_v_little_endian;
24961  int __pyx_v_t;
24962  char *__pyx_v_f;
24963  PyArray_Descr *__pyx_v_descr = 0;
24964  int __pyx_v_offset;
24965  int __pyx_r;
24966  __Pyx_RefNannyDeclarations
24967  int __pyx_t_1;
24968  int __pyx_t_2;
24969  PyObject *__pyx_t_3 = NULL;
24970  int __pyx_t_4;
24971  int __pyx_t_5;
24972  int __pyx_t_6;
24973  PyArray_Descr *__pyx_t_7;
24974  PyObject *__pyx_t_8 = NULL;
24975  char *__pyx_t_9;
24976  if (__pyx_v_info == NULL) {
24977  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
24978  return -1;
24979  }
24980  __Pyx_RefNannySetupContext("__getbuffer__", 0);
24981  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
24982  __Pyx_GIVEREF(__pyx_v_info->obj);
24983 
24984  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
24985  *
24986  * cdef int i, ndim
24987  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
24988  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
24989  *
24990  */
24991  __pyx_v_endian_detector = 1;
24992 
24993  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
24994  * cdef int i, ndim
24995  * cdef int endian_detector = 1
24996  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
24997  *
24998  * ndim = PyArray_NDIM(self)
24999  */
25000  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
25001 
25002  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
25003  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
25004  *
25005  * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
25006  *
25007  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25008  */
25009  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
25010 
25011  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
25012  * ndim = PyArray_NDIM(self)
25013  *
25014  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25015  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25016  * raise ValueError(u"ndarray is not C contiguous")
25017  */
25018  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
25019  if (__pyx_t_2) {
25020  } else {
25021  __pyx_t_1 = __pyx_t_2;
25022  goto __pyx_L4_bool_binop_done;
25023  }
25024 
25025  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
25026  *
25027  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25028  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
25029  * raise ValueError(u"ndarray is not C contiguous")
25030  *
25031  */
25032  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
25033  __pyx_t_1 = __pyx_t_2;
25034  __pyx_L4_bool_binop_done:;
25035 
25036  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
25037  * ndim = PyArray_NDIM(self)
25038  *
25039  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25040  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25041  * raise ValueError(u"ndarray is not C contiguous")
25042  */
25043  if (unlikely(__pyx_t_1)) {
25044 
25045  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
25046  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
25047  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25048  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
25049  *
25050  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25051  */
25052  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error)
25053  __Pyx_GOTREF(__pyx_t_3);
25054  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25055  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25056  __PYX_ERR(2, 272, __pyx_L1_error)
25057 
25058  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
25059  * ndim = PyArray_NDIM(self)
25060  *
25061  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
25062  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
25063  * raise ValueError(u"ndarray is not C contiguous")
25064  */
25065  }
25066 
25067  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
25068  * raise ValueError(u"ndarray is not C contiguous")
25069  *
25070  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25071  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25072  * raise ValueError(u"ndarray is not Fortran contiguous")
25073  */
25074  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
25075  if (__pyx_t_2) {
25076  } else {
25077  __pyx_t_1 = __pyx_t_2;
25078  goto __pyx_L7_bool_binop_done;
25079  }
25080 
25081  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
25082  *
25083  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25084  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
25085  * raise ValueError(u"ndarray is not Fortran contiguous")
25086  *
25087  */
25088  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
25089  __pyx_t_1 = __pyx_t_2;
25090  __pyx_L7_bool_binop_done:;
25091 
25092  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
25093  * raise ValueError(u"ndarray is not C contiguous")
25094  *
25095  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25096  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25097  * raise ValueError(u"ndarray is not Fortran contiguous")
25098  */
25099  if (unlikely(__pyx_t_1)) {
25100 
25101  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
25102  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
25103  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25104  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
25105  *
25106  * info.buf = PyArray_DATA(self)
25107  */
25108  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error)
25109  __Pyx_GOTREF(__pyx_t_3);
25110  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25111  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25112  __PYX_ERR(2, 276, __pyx_L1_error)
25113 
25114  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
25115  * raise ValueError(u"ndarray is not C contiguous")
25116  *
25117  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
25118  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
25119  * raise ValueError(u"ndarray is not Fortran contiguous")
25120  */
25121  }
25122 
25123  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
25124  * raise ValueError(u"ndarray is not Fortran contiguous")
25125  *
25126  * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
25127  * info.ndim = ndim
25128  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25129  */
25130  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
25131 
25132  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
25133  *
25134  * info.buf = PyArray_DATA(self)
25135  * info.ndim = ndim # <<<<<<<<<<<<<<
25136  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25137  * # Allocate new buffer for strides and shape info.
25138  */
25139  __pyx_v_info->ndim = __pyx_v_ndim;
25140 
25141  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
25142  * info.buf = PyArray_DATA(self)
25143  * info.ndim = ndim
25144  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25145  * # Allocate new buffer for strides and shape info.
25146  * # This is allocated as one block, strides first.
25147  */
25148  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
25149  if (__pyx_t_1) {
25150 
25151  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
25152  * # Allocate new buffer for strides and shape info.
25153  * # This is allocated as one block, strides first.
25154  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
25155  * info.shape = info.strides + ndim
25156  * for i in range(ndim):
25157  */
25158  __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
25159 
25160  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
25161  * # This is allocated as one block, strides first.
25162  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
25163  * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
25164  * for i in range(ndim):
25165  * info.strides[i] = PyArray_STRIDES(self)[i]
25166  */
25167  __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
25168 
25169  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
25170  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
25171  * info.shape = info.strides + ndim
25172  * for i in range(ndim): # <<<<<<<<<<<<<<
25173  * info.strides[i] = PyArray_STRIDES(self)[i]
25174  * info.shape[i] = PyArray_DIMS(self)[i]
25175  */
25176  __pyx_t_4 = __pyx_v_ndim;
25177  __pyx_t_5 = __pyx_t_4;
25178  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
25179  __pyx_v_i = __pyx_t_6;
25180 
25181  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
25182  * info.shape = info.strides + ndim
25183  * for i in range(ndim):
25184  * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
25185  * info.shape[i] = PyArray_DIMS(self)[i]
25186  * else:
25187  */
25188  (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
25189 
25190  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287
25191  * for i in range(ndim):
25192  * info.strides[i] = PyArray_STRIDES(self)[i]
25193  * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
25194  * else:
25195  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25196  */
25197  (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
25198  }
25199 
25200  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
25201  * info.buf = PyArray_DATA(self)
25202  * info.ndim = ndim
25203  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25204  * # Allocate new buffer for strides and shape info.
25205  * # This is allocated as one block, strides first.
25206  */
25207  goto __pyx_L9;
25208  }
25209 
25210  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
25211  * info.shape[i] = PyArray_DIMS(self)[i]
25212  * else:
25213  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
25214  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25215  * info.suboffsets = NULL
25216  */
25217  /*else*/ {
25218  __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
25219 
25220  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
25221  * else:
25222  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25223  * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
25224  * info.suboffsets = NULL
25225  * info.itemsize = PyArray_ITEMSIZE(self)
25226  */
25227  __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
25228  }
25229  __pyx_L9:;
25230 
25231  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
25232  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
25233  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25234  * info.suboffsets = NULL # <<<<<<<<<<<<<<
25235  * info.itemsize = PyArray_ITEMSIZE(self)
25236  * info.readonly = not PyArray_ISWRITEABLE(self)
25237  */
25238  __pyx_v_info->suboffsets = NULL;
25239 
25240  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
25241  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
25242  * info.suboffsets = NULL
25243  * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
25244  * info.readonly = not PyArray_ISWRITEABLE(self)
25245  *
25246  */
25247  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
25248 
25249  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
25250  * info.suboffsets = NULL
25251  * info.itemsize = PyArray_ITEMSIZE(self)
25252  * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
25253  *
25254  * cdef int t
25255  */
25256  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
25257 
25258  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296
25259  *
25260  * cdef int t
25261  * cdef char* f = NULL # <<<<<<<<<<<<<<
25262  * cdef dtype descr = <dtype>PyArray_DESCR(self)
25263  * cdef int offset
25264  */
25265  __pyx_v_f = NULL;
25266 
25267  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
25268  * cdef int t
25269  * cdef char* f = NULL
25270  * cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
25271  * cdef int offset
25272  *
25273  */
25274  __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
25275  __pyx_t_3 = ((PyObject *)__pyx_t_7);
25276  __Pyx_INCREF(__pyx_t_3);
25277  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
25278  __pyx_t_3 = 0;
25279 
25280  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300
25281  * cdef int offset
25282  *
25283  * info.obj = self # <<<<<<<<<<<<<<
25284  *
25285  * if not PyDataType_HASFIELDS(descr):
25286  */
25287  __Pyx_INCREF(((PyObject *)__pyx_v_self));
25288  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
25289  __Pyx_GOTREF(__pyx_v_info->obj);
25290  __Pyx_DECREF(__pyx_v_info->obj);
25291  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
25292 
25293  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
25294  * info.obj = self
25295  *
25296  * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
25297  * t = descr.type_num
25298  * if ((descr.byteorder == c'>' and little_endian) or
25299  */
25300  __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
25301  if (__pyx_t_1) {
25302 
25303  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303
25304  *
25305  * if not PyDataType_HASFIELDS(descr):
25306  * t = descr.type_num # <<<<<<<<<<<<<<
25307  * if ((descr.byteorder == c'>' and little_endian) or
25308  * (descr.byteorder == c'<' and not little_endian)):
25309  */
25310  __pyx_t_4 = __pyx_v_descr->type_num;
25311  __pyx_v_t = __pyx_t_4;
25312 
25313  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
25314  * if not PyDataType_HASFIELDS(descr):
25315  * t = descr.type_num
25316  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
25317  * (descr.byteorder == c'<' and not little_endian)):
25318  * raise ValueError(u"Non-native byte order not supported")
25319  */
25320  __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
25321  if (!__pyx_t_2) {
25322  goto __pyx_L15_next_or;
25323  } else {
25324  }
25325  __pyx_t_2 = (__pyx_v_little_endian != 0);
25326  if (!__pyx_t_2) {
25327  } else {
25328  __pyx_t_1 = __pyx_t_2;
25329  goto __pyx_L14_bool_binop_done;
25330  }
25331  __pyx_L15_next_or:;
25332 
25333  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305
25334  * t = descr.type_num
25335  * if ((descr.byteorder == c'>' and little_endian) or
25336  * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
25337  * raise ValueError(u"Non-native byte order not supported")
25338  * if t == NPY_BYTE: f = "b"
25339  */
25340  __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
25341  if (__pyx_t_2) {
25342  } else {
25343  __pyx_t_1 = __pyx_t_2;
25344  goto __pyx_L14_bool_binop_done;
25345  }
25346  __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
25347  __pyx_t_1 = __pyx_t_2;
25348  __pyx_L14_bool_binop_done:;
25349 
25350  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
25351  * if not PyDataType_HASFIELDS(descr):
25352  * t = descr.type_num
25353  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
25354  * (descr.byteorder == c'<' and not little_endian)):
25355  * raise ValueError(u"Non-native byte order not supported")
25356  */
25357  if (unlikely(__pyx_t_1)) {
25358 
25359  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
25360  * if ((descr.byteorder == c'>' and little_endian) or
25361  * (descr.byteorder == c'<' and not little_endian)):
25362  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
25363  * if t == NPY_BYTE: f = "b"
25364  * elif t == NPY_UBYTE: f = "B"
25365  */
25366  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error)
25367  __Pyx_GOTREF(__pyx_t_3);
25368  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25369  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25370  __PYX_ERR(2, 306, __pyx_L1_error)
25371 
25372  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
25373  * if not PyDataType_HASFIELDS(descr):
25374  * t = descr.type_num
25375  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
25376  * (descr.byteorder == c'<' and not little_endian)):
25377  * raise ValueError(u"Non-native byte order not supported")
25378  */
25379  }
25380 
25381  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307
25382  * (descr.byteorder == c'<' and not little_endian)):
25383  * raise ValueError(u"Non-native byte order not supported")
25384  * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
25385  * elif t == NPY_UBYTE: f = "B"
25386  * elif t == NPY_SHORT: f = "h"
25387  */
25388  switch (__pyx_v_t) {
25389  case NPY_BYTE:
25390  __pyx_v_f = ((char *)"b");
25391  break;
25392  case NPY_UBYTE:
25393 
25394  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308
25395  * raise ValueError(u"Non-native byte order not supported")
25396  * if t == NPY_BYTE: f = "b"
25397  * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
25398  * elif t == NPY_SHORT: f = "h"
25399  * elif t == NPY_USHORT: f = "H"
25400  */
25401  __pyx_v_f = ((char *)"B");
25402  break;
25403  case NPY_SHORT:
25404 
25405  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309
25406  * if t == NPY_BYTE: f = "b"
25407  * elif t == NPY_UBYTE: f = "B"
25408  * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
25409  * elif t == NPY_USHORT: f = "H"
25410  * elif t == NPY_INT: f = "i"
25411  */
25412  __pyx_v_f = ((char *)"h");
25413  break;
25414  case NPY_USHORT:
25415 
25416  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310
25417  * elif t == NPY_UBYTE: f = "B"
25418  * elif t == NPY_SHORT: f = "h"
25419  * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
25420  * elif t == NPY_INT: f = "i"
25421  * elif t == NPY_UINT: f = "I"
25422  */
25423  __pyx_v_f = ((char *)"H");
25424  break;
25425  case NPY_INT:
25426 
25427  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311
25428  * elif t == NPY_SHORT: f = "h"
25429  * elif t == NPY_USHORT: f = "H"
25430  * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
25431  * elif t == NPY_UINT: f = "I"
25432  * elif t == NPY_LONG: f = "l"
25433  */
25434  __pyx_v_f = ((char *)"i");
25435  break;
25436  case NPY_UINT:
25437 
25438  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312
25439  * elif t == NPY_USHORT: f = "H"
25440  * elif t == NPY_INT: f = "i"
25441  * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
25442  * elif t == NPY_LONG: f = "l"
25443  * elif t == NPY_ULONG: f = "L"
25444  */
25445  __pyx_v_f = ((char *)"I");
25446  break;
25447  case NPY_LONG:
25448 
25449  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313
25450  * elif t == NPY_INT: f = "i"
25451  * elif t == NPY_UINT: f = "I"
25452  * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
25453  * elif t == NPY_ULONG: f = "L"
25454  * elif t == NPY_LONGLONG: f = "q"
25455  */
25456  __pyx_v_f = ((char *)"l");
25457  break;
25458  case NPY_ULONG:
25459 
25460  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314
25461  * elif t == NPY_UINT: f = "I"
25462  * elif t == NPY_LONG: f = "l"
25463  * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
25464  * elif t == NPY_LONGLONG: f = "q"
25465  * elif t == NPY_ULONGLONG: f = "Q"
25466  */
25467  __pyx_v_f = ((char *)"L");
25468  break;
25469  case NPY_LONGLONG:
25470 
25471  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315
25472  * elif t == NPY_LONG: f = "l"
25473  * elif t == NPY_ULONG: f = "L"
25474  * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
25475  * elif t == NPY_ULONGLONG: f = "Q"
25476  * elif t == NPY_FLOAT: f = "f"
25477  */
25478  __pyx_v_f = ((char *)"q");
25479  break;
25480  case NPY_ULONGLONG:
25481 
25482  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316
25483  * elif t == NPY_ULONG: f = "L"
25484  * elif t == NPY_LONGLONG: f = "q"
25485  * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
25486  * elif t == NPY_FLOAT: f = "f"
25487  * elif t == NPY_DOUBLE: f = "d"
25488  */
25489  __pyx_v_f = ((char *)"Q");
25490  break;
25491  case NPY_FLOAT:
25492 
25493  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317
25494  * elif t == NPY_LONGLONG: f = "q"
25495  * elif t == NPY_ULONGLONG: f = "Q"
25496  * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
25497  * elif t == NPY_DOUBLE: f = "d"
25498  * elif t == NPY_LONGDOUBLE: f = "g"
25499  */
25500  __pyx_v_f = ((char *)"f");
25501  break;
25502  case NPY_DOUBLE:
25503 
25504  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318
25505  * elif t == NPY_ULONGLONG: f = "Q"
25506  * elif t == NPY_FLOAT: f = "f"
25507  * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
25508  * elif t == NPY_LONGDOUBLE: f = "g"
25509  * elif t == NPY_CFLOAT: f = "Zf"
25510  */
25511  __pyx_v_f = ((char *)"d");
25512  break;
25513  case NPY_LONGDOUBLE:
25514 
25515  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319
25516  * elif t == NPY_FLOAT: f = "f"
25517  * elif t == NPY_DOUBLE: f = "d"
25518  * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
25519  * elif t == NPY_CFLOAT: f = "Zf"
25520  * elif t == NPY_CDOUBLE: f = "Zd"
25521  */
25522  __pyx_v_f = ((char *)"g");
25523  break;
25524  case NPY_CFLOAT:
25525 
25526  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320
25527  * elif t == NPY_DOUBLE: f = "d"
25528  * elif t == NPY_LONGDOUBLE: f = "g"
25529  * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
25530  * elif t == NPY_CDOUBLE: f = "Zd"
25531  * elif t == NPY_CLONGDOUBLE: f = "Zg"
25532  */
25533  __pyx_v_f = ((char *)"Zf");
25534  break;
25535  case NPY_CDOUBLE:
25536 
25537  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321
25538  * elif t == NPY_LONGDOUBLE: f = "g"
25539  * elif t == NPY_CFLOAT: f = "Zf"
25540  * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
25541  * elif t == NPY_CLONGDOUBLE: f = "Zg"
25542  * elif t == NPY_OBJECT: f = "O"
25543  */
25544  __pyx_v_f = ((char *)"Zd");
25545  break;
25546  case NPY_CLONGDOUBLE:
25547 
25548  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322
25549  * elif t == NPY_CFLOAT: f = "Zf"
25550  * elif t == NPY_CDOUBLE: f = "Zd"
25551  * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
25552  * elif t == NPY_OBJECT: f = "O"
25553  * else:
25554  */
25555  __pyx_v_f = ((char *)"Zg");
25556  break;
25557  case NPY_OBJECT:
25558 
25559  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323
25560  * elif t == NPY_CDOUBLE: f = "Zd"
25561  * elif t == NPY_CLONGDOUBLE: f = "Zg"
25562  * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
25563  * else:
25564  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
25565  */
25566  __pyx_v_f = ((char *)"O");
25567  break;
25568  default:
25569 
25570  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325
25571  * elif t == NPY_OBJECT: f = "O"
25572  * else:
25573  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
25574  * info.format = f
25575  * return
25576  */
25577  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
25578  __Pyx_GOTREF(__pyx_t_3);
25579  __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error)
25580  __Pyx_GOTREF(__pyx_t_8);
25581  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25582  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
25583  __Pyx_GOTREF(__pyx_t_3);
25584  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
25585  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25586  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25587  __PYX_ERR(2, 325, __pyx_L1_error)
25588  break;
25589  }
25590 
25591  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326
25592  * else:
25593  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
25594  * info.format = f # <<<<<<<<<<<<<<
25595  * return
25596  * else:
25597  */
25598  __pyx_v_info->format = __pyx_v_f;
25599 
25600  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327
25601  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
25602  * info.format = f
25603  * return # <<<<<<<<<<<<<<
25604  * else:
25605  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
25606  */
25607  __pyx_r = 0;
25608  goto __pyx_L0;
25609 
25610  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
25611  * info.obj = self
25612  *
25613  * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
25614  * t = descr.type_num
25615  * if ((descr.byteorder == c'>' and little_endian) or
25616  */
25617  }
25618 
25619  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329
25620  * return
25621  * else:
25622  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
25623  * info.format[0] = c'^' # Native data types, manual alignment
25624  * offset = 0
25625  */
25626  /*else*/ {
25627  __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
25628 
25629  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330
25630  * else:
25631  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
25632  * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
25633  * offset = 0
25634  * f = _util_dtypestring(descr, info.format + 1,
25635  */
25636  (__pyx_v_info->format[0]) = '^';
25637 
25638  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331
25639  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
25640  * info.format[0] = c'^' # Native data types, manual alignment
25641  * offset = 0 # <<<<<<<<<<<<<<
25642  * f = _util_dtypestring(descr, info.format + 1,
25643  * info.format + _buffer_format_string_len,
25644  */
25645  __pyx_v_offset = 0;
25646 
25647  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332
25648  * info.format[0] = c'^' # Native data types, manual alignment
25649  * offset = 0
25650  * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
25651  * info.format + _buffer_format_string_len,
25652  * &offset)
25653  */
25654  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error)
25655  __pyx_v_f = __pyx_t_9;
25656 
25657  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335
25658  * info.format + _buffer_format_string_len,
25659  * &offset)
25660  * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
25661  *
25662  * def __releasebuffer__(ndarray self, Py_buffer* info):
25663  */
25664  (__pyx_v_f[0]) = '\x00';
25665  }
25666 
25667  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
25668  * # experimental exception made for __getbuffer__ and __releasebuffer__
25669  * # -- the details of this may change.
25670  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
25671  * # This implementation of getbuffer is geared towards Cython
25672  * # requirements, and does not yet fulfill the PEP.
25673  */
25674 
25675  /* function exit code */
25676  __pyx_r = 0;
25677  goto __pyx_L0;
25678  __pyx_L1_error:;
25679  __Pyx_XDECREF(__pyx_t_3);
25680  __Pyx_XDECREF(__pyx_t_8);
25681  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25682  __pyx_r = -1;
25683  if (__pyx_v_info->obj != NULL) {
25684  __Pyx_GOTREF(__pyx_v_info->obj);
25685  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25686  }
25687  goto __pyx_L2;
25688  __pyx_L0:;
25689  if (__pyx_v_info->obj == Py_None) {
25690  __Pyx_GOTREF(__pyx_v_info->obj);
25691  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25692  }
25693  __pyx_L2:;
25694  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
25695  __Pyx_RefNannyFinishContext();
25696  return __pyx_r;
25697 }
25698 
25699 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
25700  * f[0] = c'\0' # Terminate format string
25701  *
25702  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
25703  * if PyArray_HASFIELDS(self):
25704  * PyObject_Free(info.format)
25705  */
25706 
25707 /* Python wrapper */
25708 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
25709 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
25710  __Pyx_RefNannyDeclarations
25711  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
25712  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
25713 
25714  /* function exit code */
25715  __Pyx_RefNannyFinishContext();
25716 }
25717 
25718 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
25719  __Pyx_RefNannyDeclarations
25720  int __pyx_t_1;
25721  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
25722 
25723  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
25724  *
25725  * def __releasebuffer__(ndarray self, Py_buffer* info):
25726  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
25727  * PyObject_Free(info.format)
25728  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25729  */
25730  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
25731  if (__pyx_t_1) {
25732 
25733  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339
25734  * def __releasebuffer__(ndarray self, Py_buffer* info):
25735  * if PyArray_HASFIELDS(self):
25736  * PyObject_Free(info.format) # <<<<<<<<<<<<<<
25737  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25738  * PyObject_Free(info.strides)
25739  */
25740  PyObject_Free(__pyx_v_info->format);
25741 
25742  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
25743  *
25744  * def __releasebuffer__(ndarray self, Py_buffer* info):
25745  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
25746  * PyObject_Free(info.format)
25747  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25748  */
25749  }
25750 
25751  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
25752  * if PyArray_HASFIELDS(self):
25753  * PyObject_Free(info.format)
25754  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25755  * PyObject_Free(info.strides)
25756  * # info.shape was stored after info.strides in the same block
25757  */
25758  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
25759  if (__pyx_t_1) {
25760 
25761  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341
25762  * PyObject_Free(info.format)
25763  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
25764  * PyObject_Free(info.strides) # <<<<<<<<<<<<<<
25765  * # info.shape was stored after info.strides in the same block
25766  *
25767  */
25768  PyObject_Free(__pyx_v_info->strides);
25769 
25770  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
25771  * if PyArray_HASFIELDS(self):
25772  * PyObject_Free(info.format)
25773  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
25774  * PyObject_Free(info.strides)
25775  * # info.shape was stored after info.strides in the same block
25776  */
25777  }
25778 
25779  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
25780  * f[0] = c'\0' # Terminate format string
25781  *
25782  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
25783  * if PyArray_HASFIELDS(self):
25784  * PyObject_Free(info.format)
25785  */
25786 
25787  /* function exit code */
25788  __Pyx_RefNannyFinishContext();
25789 }
25790 
25791 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
25792  * ctypedef npy_cdouble complex_t
25793  *
25794  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
25795  * return PyArray_MultiIterNew(1, <void*>a)
25796  *
25797  */
25798 
25799 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
25800  PyObject *__pyx_r = NULL;
25801  __Pyx_RefNannyDeclarations
25802  PyObject *__pyx_t_1 = NULL;
25803  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
25804 
25805  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
25806  *
25807  * cdef inline object PyArray_MultiIterNew1(a):
25808  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
25809  *
25810  * cdef inline object PyArray_MultiIterNew2(a, b):
25811  */
25812  __Pyx_XDECREF(__pyx_r);
25813  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error)
25814  __Pyx_GOTREF(__pyx_t_1);
25815  __pyx_r = __pyx_t_1;
25816  __pyx_t_1 = 0;
25817  goto __pyx_L0;
25818 
25819  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
25820  * ctypedef npy_cdouble complex_t
25821  *
25822  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
25823  * return PyArray_MultiIterNew(1, <void*>a)
25824  *
25825  */
25826 
25827  /* function exit code */
25828  __pyx_L1_error:;
25829  __Pyx_XDECREF(__pyx_t_1);
25830  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
25831  __pyx_r = 0;
25832  __pyx_L0:;
25833  __Pyx_XGIVEREF(__pyx_r);
25834  __Pyx_RefNannyFinishContext();
25835  return __pyx_r;
25836 }
25837 
25838 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
25839  * return PyArray_MultiIterNew(1, <void*>a)
25840  *
25841  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
25842  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
25843  *
25844  */
25845 
25846 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
25847  PyObject *__pyx_r = NULL;
25848  __Pyx_RefNannyDeclarations
25849  PyObject *__pyx_t_1 = NULL;
25850  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
25851 
25852  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825
25853  *
25854  * cdef inline object PyArray_MultiIterNew2(a, b):
25855  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
25856  *
25857  * cdef inline object PyArray_MultiIterNew3(a, b, c):
25858  */
25859  __Pyx_XDECREF(__pyx_r);
25860  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error)
25861  __Pyx_GOTREF(__pyx_t_1);
25862  __pyx_r = __pyx_t_1;
25863  __pyx_t_1 = 0;
25864  goto __pyx_L0;
25865 
25866  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
25867  * return PyArray_MultiIterNew(1, <void*>a)
25868  *
25869  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
25870  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
25871  *
25872  */
25873 
25874  /* function exit code */
25875  __pyx_L1_error:;
25876  __Pyx_XDECREF(__pyx_t_1);
25877  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
25878  __pyx_r = 0;
25879  __pyx_L0:;
25880  __Pyx_XGIVEREF(__pyx_r);
25881  __Pyx_RefNannyFinishContext();
25882  return __pyx_r;
25883 }
25884 
25885 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
25886  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
25887  *
25888  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
25889  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
25890  *
25891  */
25892 
25893 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
25894  PyObject *__pyx_r = NULL;
25895  __Pyx_RefNannyDeclarations
25896  PyObject *__pyx_t_1 = NULL;
25897  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
25898 
25899  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
25900  *
25901  * cdef inline object PyArray_MultiIterNew3(a, b, c):
25902  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
25903  *
25904  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
25905  */
25906  __Pyx_XDECREF(__pyx_r);
25907  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error)
25908  __Pyx_GOTREF(__pyx_t_1);
25909  __pyx_r = __pyx_t_1;
25910  __pyx_t_1 = 0;
25911  goto __pyx_L0;
25912 
25913  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
25914  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
25915  *
25916  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
25917  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
25918  *
25919  */
25920 
25921  /* function exit code */
25922  __pyx_L1_error:;
25923  __Pyx_XDECREF(__pyx_t_1);
25924  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
25925  __pyx_r = 0;
25926  __pyx_L0:;
25927  __Pyx_XGIVEREF(__pyx_r);
25928  __Pyx_RefNannyFinishContext();
25929  return __pyx_r;
25930 }
25931 
25932 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
25933  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
25934  *
25935  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
25936  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
25937  *
25938  */
25939 
25940 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
25941  PyObject *__pyx_r = NULL;
25942  __Pyx_RefNannyDeclarations
25943  PyObject *__pyx_t_1 = NULL;
25944  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
25945 
25946  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
25947  *
25948  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
25949  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
25950  *
25951  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
25952  */
25953  __Pyx_XDECREF(__pyx_r);
25954  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error)
25955  __Pyx_GOTREF(__pyx_t_1);
25956  __pyx_r = __pyx_t_1;
25957  __pyx_t_1 = 0;
25958  goto __pyx_L0;
25959 
25960  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
25961  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
25962  *
25963  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
25964  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
25965  *
25966  */
25967 
25968  /* function exit code */
25969  __pyx_L1_error:;
25970  __Pyx_XDECREF(__pyx_t_1);
25971  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
25972  __pyx_r = 0;
25973  __pyx_L0:;
25974  __Pyx_XGIVEREF(__pyx_r);
25975  __Pyx_RefNannyFinishContext();
25976  return __pyx_r;
25977 }
25978 
25979 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
25980  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
25981  *
25982  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
25983  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
25984  *
25985  */
25986 
25987 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
25988  PyObject *__pyx_r = NULL;
25989  __Pyx_RefNannyDeclarations
25990  PyObject *__pyx_t_1 = NULL;
25991  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
25992 
25993  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
25994  *
25995  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
25996  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
25997  *
25998  * cdef inline tuple PyDataType_SHAPE(dtype d):
25999  */
26000  __Pyx_XDECREF(__pyx_r);
26001  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error)
26002  __Pyx_GOTREF(__pyx_t_1);
26003  __pyx_r = __pyx_t_1;
26004  __pyx_t_1 = 0;
26005  goto __pyx_L0;
26006 
26007  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
26008  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
26009  *
26010  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
26011  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26012  *
26013  */
26014 
26015  /* function exit code */
26016  __pyx_L1_error:;
26017  __Pyx_XDECREF(__pyx_t_1);
26018  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
26019  __pyx_r = 0;
26020  __pyx_L0:;
26021  __Pyx_XGIVEREF(__pyx_r);
26022  __Pyx_RefNannyFinishContext();
26023  return __pyx_r;
26024 }
26025 
26026 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
26027  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26028  *
26029  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
26030  * if PyDataType_HASSUBARRAY(d):
26031  * return <tuple>d.subarray.shape
26032  */
26033 
26034 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
26035  PyObject *__pyx_r = NULL;
26036  __Pyx_RefNannyDeclarations
26037  int __pyx_t_1;
26038  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
26039 
26040  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
26041  *
26042  * cdef inline tuple PyDataType_SHAPE(dtype d):
26043  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
26044  * return <tuple>d.subarray.shape
26045  * else:
26046  */
26047  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
26048  if (__pyx_t_1) {
26049 
26050  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
26051  * cdef inline tuple PyDataType_SHAPE(dtype d):
26052  * if PyDataType_HASSUBARRAY(d):
26053  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
26054  * else:
26055  * return ()
26056  */
26057  __Pyx_XDECREF(__pyx_r);
26058  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
26059  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
26060  goto __pyx_L0;
26061 
26062  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
26063  *
26064  * cdef inline tuple PyDataType_SHAPE(dtype d):
26065  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
26066  * return <tuple>d.subarray.shape
26067  * else:
26068  */
26069  }
26070 
26071  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
26072  * return <tuple>d.subarray.shape
26073  * else:
26074  * return () # <<<<<<<<<<<<<<
26075  *
26076  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
26077  */
26078  /*else*/ {
26079  __Pyx_XDECREF(__pyx_r);
26080  __Pyx_INCREF(__pyx_empty_tuple);
26081  __pyx_r = __pyx_empty_tuple;
26082  goto __pyx_L0;
26083  }
26084 
26085  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
26086  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
26087  *
26088  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
26089  * if PyDataType_HASSUBARRAY(d):
26090  * return <tuple>d.subarray.shape
26091  */
26092 
26093  /* function exit code */
26094  __pyx_L0:;
26095  __Pyx_XGIVEREF(__pyx_r);
26096  __Pyx_RefNannyFinishContext();
26097  return __pyx_r;
26098 }
26099 
26100 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
26101  * return ()
26102  *
26103  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
26104  * # Recursive utility function used in __getbuffer__ to get format
26105  * # string. The new location in the format string is returned.
26106  */
26107 
26108 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
26109  PyArray_Descr *__pyx_v_child = 0;
26110  int __pyx_v_endian_detector;
26111  int __pyx_v_little_endian;
26112  PyObject *__pyx_v_fields = 0;
26113  PyObject *__pyx_v_childname = NULL;
26114  PyObject *__pyx_v_new_offset = NULL;
26115  PyObject *__pyx_v_t = NULL;
26116  char *__pyx_r;
26117  __Pyx_RefNannyDeclarations
26118  PyObject *__pyx_t_1 = NULL;
26119  Py_ssize_t __pyx_t_2;
26120  PyObject *__pyx_t_3 = NULL;
26121  PyObject *__pyx_t_4 = NULL;
26122  int __pyx_t_5;
26123  int __pyx_t_6;
26124  int __pyx_t_7;
26125  long __pyx_t_8;
26126  char *__pyx_t_9;
26127  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
26128 
26129  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847
26130  *
26131  * cdef dtype child
26132  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
26133  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
26134  * cdef tuple fields
26135  */
26136  __pyx_v_endian_detector = 1;
26137 
26138  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848
26139  * cdef dtype child
26140  * cdef int endian_detector = 1
26141  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
26142  * cdef tuple fields
26143  *
26144  */
26145  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
26146 
26147  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
26148  * cdef tuple fields
26149  *
26150  * for childname in descr.names: # <<<<<<<<<<<<<<
26151  * fields = descr.fields[childname]
26152  * child, new_offset = fields
26153  */
26154  if (unlikely(__pyx_v_descr->names == Py_None)) {
26155  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
26156  __PYX_ERR(2, 851, __pyx_L1_error)
26157  }
26158  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
26159  for (;;) {
26160  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
26161  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26162  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error)
26163  #else
26164  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error)
26165  __Pyx_GOTREF(__pyx_t_3);
26166  #endif
26167  __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
26168  __pyx_t_3 = 0;
26169 
26170  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852
26171  *
26172  * for childname in descr.names:
26173  * fields = descr.fields[childname] # <<<<<<<<<<<<<<
26174  * child, new_offset = fields
26175  *
26176  */
26177  if (unlikely(__pyx_v_descr->fields == Py_None)) {
26178  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
26179  __PYX_ERR(2, 852, __pyx_L1_error)
26180  }
26181  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error)
26182  __Pyx_GOTREF(__pyx_t_3);
26183  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error)
26184  __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
26185  __pyx_t_3 = 0;
26186 
26187  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853
26188  * for childname in descr.names:
26189  * fields = descr.fields[childname]
26190  * child, new_offset = fields # <<<<<<<<<<<<<<
26191  *
26192  * if (end - f) - <int>(new_offset - offset[0]) < 15:
26193  */
26194  if (likely(__pyx_v_fields != Py_None)) {
26195  PyObject* sequence = __pyx_v_fields;
26196  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
26197  if (unlikely(size != 2)) {
26198  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
26199  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
26200  __PYX_ERR(2, 853, __pyx_L1_error)
26201  }
26202  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
26203  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
26204  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
26205  __Pyx_INCREF(__pyx_t_3);
26206  __Pyx_INCREF(__pyx_t_4);
26207  #else
26208  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error)
26209  __Pyx_GOTREF(__pyx_t_3);
26210  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error)
26211  __Pyx_GOTREF(__pyx_t_4);
26212  #endif
26213  } else {
26214  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error)
26215  }
26216  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error)
26217  __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
26218  __pyx_t_3 = 0;
26219  __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
26220  __pyx_t_4 = 0;
26221 
26222  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
26223  * child, new_offset = fields
26224  *
26225  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
26226  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26227  *
26228  */
26229  __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error)
26230  __Pyx_GOTREF(__pyx_t_4);
26231  __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error)
26232  __Pyx_GOTREF(__pyx_t_3);
26233  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26234  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error)
26235  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26236  __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
26237  if (unlikely(__pyx_t_6)) {
26238 
26239  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
26240  *
26241  * if (end - f) - <int>(new_offset - offset[0]) < 15:
26242  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
26243  *
26244  * if ((child.byteorder == c'>' and little_endian) or
26245  */
26246  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error)
26247  __Pyx_GOTREF(__pyx_t_3);
26248  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26249  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26250  __PYX_ERR(2, 856, __pyx_L1_error)
26251 
26252  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
26253  * child, new_offset = fields
26254  *
26255  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
26256  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26257  *
26258  */
26259  }
26260 
26261  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
26262  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26263  *
26264  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26265  * (child.byteorder == c'<' and not little_endian)):
26266  * raise ValueError(u"Non-native byte order not supported")
26267  */
26268  __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
26269  if (!__pyx_t_7) {
26270  goto __pyx_L8_next_or;
26271  } else {
26272  }
26273  __pyx_t_7 = (__pyx_v_little_endian != 0);
26274  if (!__pyx_t_7) {
26275  } else {
26276  __pyx_t_6 = __pyx_t_7;
26277  goto __pyx_L7_bool_binop_done;
26278  }
26279  __pyx_L8_next_or:;
26280 
26281  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859
26282  *
26283  * if ((child.byteorder == c'>' and little_endian) or
26284  * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
26285  * raise ValueError(u"Non-native byte order not supported")
26286  * # One could encode it in the format string and have Cython
26287  */
26288  __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
26289  if (__pyx_t_7) {
26290  } else {
26291  __pyx_t_6 = __pyx_t_7;
26292  goto __pyx_L7_bool_binop_done;
26293  }
26294  __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
26295  __pyx_t_6 = __pyx_t_7;
26296  __pyx_L7_bool_binop_done:;
26297 
26298  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
26299  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26300  *
26301  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26302  * (child.byteorder == c'<' and not little_endian)):
26303  * raise ValueError(u"Non-native byte order not supported")
26304  */
26305  if (unlikely(__pyx_t_6)) {
26306 
26307  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
26308  * if ((child.byteorder == c'>' and little_endian) or
26309  * (child.byteorder == c'<' and not little_endian)):
26310  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
26311  * # One could encode it in the format string and have Cython
26312  * # complain instead, BUT: < and > in format strings also imply
26313  */
26314  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error)
26315  __Pyx_GOTREF(__pyx_t_3);
26316  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
26317  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26318  __PYX_ERR(2, 860, __pyx_L1_error)
26319 
26320  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
26321  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
26322  *
26323  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
26324  * (child.byteorder == c'<' and not little_endian)):
26325  * raise ValueError(u"Non-native byte order not supported")
26326  */
26327  }
26328 
26329  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870
26330  *
26331  * # Output padding bytes
26332  * while offset[0] < new_offset: # <<<<<<<<<<<<<<
26333  * f[0] = 120 # "x"; pad byte
26334  * f += 1
26335  */
26336  while (1) {
26337  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error)
26338  __Pyx_GOTREF(__pyx_t_3);
26339  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error)
26340  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26341  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error)
26342  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26343  if (!__pyx_t_6) break;
26344 
26345  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871
26346  * # Output padding bytes
26347  * while offset[0] < new_offset:
26348  * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
26349  * f += 1
26350  * offset[0] += 1
26351  */
26352  (__pyx_v_f[0]) = 0x78;
26353 
26354  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872
26355  * while offset[0] < new_offset:
26356  * f[0] = 120 # "x"; pad byte
26357  * f += 1 # <<<<<<<<<<<<<<
26358  * offset[0] += 1
26359  *
26360  */
26361  __pyx_v_f = (__pyx_v_f + 1);
26362 
26363  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873
26364  * f[0] = 120 # "x"; pad byte
26365  * f += 1
26366  * offset[0] += 1 # <<<<<<<<<<<<<<
26367  *
26368  * offset[0] += child.itemsize
26369  */
26370  __pyx_t_8 = 0;
26371  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
26372  }
26373 
26374  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875
26375  * offset[0] += 1
26376  *
26377  * offset[0] += child.itemsize # <<<<<<<<<<<<<<
26378  *
26379  * if not PyDataType_HASFIELDS(child):
26380  */
26381  __pyx_t_8 = 0;
26382  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
26383 
26384  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
26385  * offset[0] += child.itemsize
26386  *
26387  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
26388  * t = child.type_num
26389  * if end - f < 5:
26390  */
26391  __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
26392  if (__pyx_t_6) {
26393 
26394  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878
26395  *
26396  * if not PyDataType_HASFIELDS(child):
26397  * t = child.type_num # <<<<<<<<<<<<<<
26398  * if end - f < 5:
26399  * raise RuntimeError(u"Format string allocated too short.")
26400  */
26401  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error)
26402  __Pyx_GOTREF(__pyx_t_4);
26403  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
26404  __pyx_t_4 = 0;
26405 
26406  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
26407  * if not PyDataType_HASFIELDS(child):
26408  * t = child.type_num
26409  * if end - f < 5: # <<<<<<<<<<<<<<
26410  * raise RuntimeError(u"Format string allocated too short.")
26411  *
26412  */
26413  __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
26414  if (unlikely(__pyx_t_6)) {
26415 
26416  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
26417  * t = child.type_num
26418  * if end - f < 5:
26419  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
26420  *
26421  * # Until ticket #99 is fixed, use integers to avoid warnings
26422  */
26423  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error)
26424  __Pyx_GOTREF(__pyx_t_4);
26425  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
26426  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26427  __PYX_ERR(2, 880, __pyx_L1_error)
26428 
26429  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
26430  * if not PyDataType_HASFIELDS(child):
26431  * t = child.type_num
26432  * if end - f < 5: # <<<<<<<<<<<<<<
26433  * raise RuntimeError(u"Format string allocated too short.")
26434  *
26435  */
26436  }
26437 
26438  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883
26439  *
26440  * # Until ticket #99 is fixed, use integers to avoid warnings
26441  * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
26442  * elif t == NPY_UBYTE: f[0] = 66 #"B"
26443  * elif t == NPY_SHORT: f[0] = 104 #"h"
26444  */
26445  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error)
26446  __Pyx_GOTREF(__pyx_t_4);
26447  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error)
26448  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26449  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error)
26450  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26451  if (__pyx_t_6) {
26452  (__pyx_v_f[0]) = 98;
26453  goto __pyx_L15;
26454  }
26455 
26456  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884
26457  * # Until ticket #99 is fixed, use integers to avoid warnings
26458  * if t == NPY_BYTE: f[0] = 98 #"b"
26459  * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
26460  * elif t == NPY_SHORT: f[0] = 104 #"h"
26461  * elif t == NPY_USHORT: f[0] = 72 #"H"
26462  */
26463  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error)
26464  __Pyx_GOTREF(__pyx_t_3);
26465  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error)
26466  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26467  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error)
26468  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26469  if (__pyx_t_6) {
26470  (__pyx_v_f[0]) = 66;
26471  goto __pyx_L15;
26472  }
26473 
26474  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885
26475  * if t == NPY_BYTE: f[0] = 98 #"b"
26476  * elif t == NPY_UBYTE: f[0] = 66 #"B"
26477  * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
26478  * elif t == NPY_USHORT: f[0] = 72 #"H"
26479  * elif t == NPY_INT: f[0] = 105 #"i"
26480  */
26481  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error)
26482  __Pyx_GOTREF(__pyx_t_4);
26483  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error)
26484  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26485  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error)
26486  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26487  if (__pyx_t_6) {
26488  (__pyx_v_f[0]) = 0x68;
26489  goto __pyx_L15;
26490  }
26491 
26492  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886
26493  * elif t == NPY_UBYTE: f[0] = 66 #"B"
26494  * elif t == NPY_SHORT: f[0] = 104 #"h"
26495  * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
26496  * elif t == NPY_INT: f[0] = 105 #"i"
26497  * elif t == NPY_UINT: f[0] = 73 #"I"
26498  */
26499  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error)
26500  __Pyx_GOTREF(__pyx_t_3);
26501  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error)
26502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26503  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error)
26504  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26505  if (__pyx_t_6) {
26506  (__pyx_v_f[0]) = 72;
26507  goto __pyx_L15;
26508  }
26509 
26510  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887
26511  * elif t == NPY_SHORT: f[0] = 104 #"h"
26512  * elif t == NPY_USHORT: f[0] = 72 #"H"
26513  * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
26514  * elif t == NPY_UINT: f[0] = 73 #"I"
26515  * elif t == NPY_LONG: f[0] = 108 #"l"
26516  */
26517  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error)
26518  __Pyx_GOTREF(__pyx_t_4);
26519  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error)
26520  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26521  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error)
26522  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26523  if (__pyx_t_6) {
26524  (__pyx_v_f[0]) = 0x69;
26525  goto __pyx_L15;
26526  }
26527 
26528  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888
26529  * elif t == NPY_USHORT: f[0] = 72 #"H"
26530  * elif t == NPY_INT: f[0] = 105 #"i"
26531  * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
26532  * elif t == NPY_LONG: f[0] = 108 #"l"
26533  * elif t == NPY_ULONG: f[0] = 76 #"L"
26534  */
26535  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error)
26536  __Pyx_GOTREF(__pyx_t_3);
26537  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error)
26538  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26539  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error)
26540  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26541  if (__pyx_t_6) {
26542  (__pyx_v_f[0]) = 73;
26543  goto __pyx_L15;
26544  }
26545 
26546  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889
26547  * elif t == NPY_INT: f[0] = 105 #"i"
26548  * elif t == NPY_UINT: f[0] = 73 #"I"
26549  * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
26550  * elif t == NPY_ULONG: f[0] = 76 #"L"
26551  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
26552  */
26553  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error)
26554  __Pyx_GOTREF(__pyx_t_4);
26555  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error)
26556  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26557  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error)
26558  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26559  if (__pyx_t_6) {
26560  (__pyx_v_f[0]) = 0x6C;
26561  goto __pyx_L15;
26562  }
26563 
26564  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890
26565  * elif t == NPY_UINT: f[0] = 73 #"I"
26566  * elif t == NPY_LONG: f[0] = 108 #"l"
26567  * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
26568  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
26569  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
26570  */
26571  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error)
26572  __Pyx_GOTREF(__pyx_t_3);
26573  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error)
26574  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26575  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error)
26576  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26577  if (__pyx_t_6) {
26578  (__pyx_v_f[0]) = 76;
26579  goto __pyx_L15;
26580  }
26581 
26582  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891
26583  * elif t == NPY_LONG: f[0] = 108 #"l"
26584  * elif t == NPY_ULONG: f[0] = 76 #"L"
26585  * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
26586  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
26587  * elif t == NPY_FLOAT: f[0] = 102 #"f"
26588  */
26589  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error)
26590  __Pyx_GOTREF(__pyx_t_4);
26591  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error)
26592  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26593  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error)
26594  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26595  if (__pyx_t_6) {
26596  (__pyx_v_f[0]) = 0x71;
26597  goto __pyx_L15;
26598  }
26599 
26600  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892
26601  * elif t == NPY_ULONG: f[0] = 76 #"L"
26602  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
26603  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
26604  * elif t == NPY_FLOAT: f[0] = 102 #"f"
26605  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
26606  */
26607  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error)
26608  __Pyx_GOTREF(__pyx_t_3);
26609  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error)
26610  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26611  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error)
26612  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26613  if (__pyx_t_6) {
26614  (__pyx_v_f[0]) = 81;
26615  goto __pyx_L15;
26616  }
26617 
26618  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893
26619  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
26620  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
26621  * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
26622  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
26623  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
26624  */
26625  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error)
26626  __Pyx_GOTREF(__pyx_t_4);
26627  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error)
26628  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26629  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error)
26630  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26631  if (__pyx_t_6) {
26632  (__pyx_v_f[0]) = 0x66;
26633  goto __pyx_L15;
26634  }
26635 
26636  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894
26637  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
26638  * elif t == NPY_FLOAT: f[0] = 102 #"f"
26639  * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
26640  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
26641  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
26642  */
26643  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error)
26644  __Pyx_GOTREF(__pyx_t_3);
26645  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error)
26646  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26647  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error)
26648  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26649  if (__pyx_t_6) {
26650  (__pyx_v_f[0]) = 0x64;
26651  goto __pyx_L15;
26652  }
26653 
26654  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895
26655  * elif t == NPY_FLOAT: f[0] = 102 #"f"
26656  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
26657  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
26658  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
26659  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
26660  */
26661  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error)
26662  __Pyx_GOTREF(__pyx_t_4);
26663  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error)
26664  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26665  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error)
26666  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26667  if (__pyx_t_6) {
26668  (__pyx_v_f[0]) = 0x67;
26669  goto __pyx_L15;
26670  }
26671 
26672  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896
26673  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
26674  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
26675  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
26676  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
26677  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
26678  */
26679  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error)
26680  __Pyx_GOTREF(__pyx_t_3);
26681  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error)
26682  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26683  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error)
26684  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26685  if (__pyx_t_6) {
26686  (__pyx_v_f[0]) = 90;
26687  (__pyx_v_f[1]) = 0x66;
26688  __pyx_v_f = (__pyx_v_f + 1);
26689  goto __pyx_L15;
26690  }
26691 
26692  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897
26693  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
26694  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
26695  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
26696  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
26697  * elif t == NPY_OBJECT: f[0] = 79 #"O"
26698  */
26699  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error)
26700  __Pyx_GOTREF(__pyx_t_4);
26701  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error)
26702  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26703  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error)
26704  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26705  if (__pyx_t_6) {
26706  (__pyx_v_f[0]) = 90;
26707  (__pyx_v_f[1]) = 0x64;
26708  __pyx_v_f = (__pyx_v_f + 1);
26709  goto __pyx_L15;
26710  }
26711 
26712  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898
26713  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
26714  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
26715  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
26716  * elif t == NPY_OBJECT: f[0] = 79 #"O"
26717  * else:
26718  */
26719  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error)
26720  __Pyx_GOTREF(__pyx_t_3);
26721  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error)
26722  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26723  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error)
26724  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26725  if (__pyx_t_6) {
26726  (__pyx_v_f[0]) = 90;
26727  (__pyx_v_f[1]) = 0x67;
26728  __pyx_v_f = (__pyx_v_f + 1);
26729  goto __pyx_L15;
26730  }
26731 
26732  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899
26733  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
26734  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
26735  * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
26736  * else:
26737  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26738  */
26739  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error)
26740  __Pyx_GOTREF(__pyx_t_4);
26741  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error)
26742  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26743  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error)
26744  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26745  if (likely(__pyx_t_6)) {
26746  (__pyx_v_f[0]) = 79;
26747  goto __pyx_L15;
26748  }
26749 
26750  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901
26751  * elif t == NPY_OBJECT: f[0] = 79 #"O"
26752  * else:
26753  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
26754  * f += 1
26755  * else:
26756  */
26757  /*else*/ {
26758  __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error)
26759  __Pyx_GOTREF(__pyx_t_3);
26760  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error)
26761  __Pyx_GOTREF(__pyx_t_4);
26762  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26763  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
26764  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26765  __PYX_ERR(2, 901, __pyx_L1_error)
26766  }
26767  __pyx_L15:;
26768 
26769  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902
26770  * else:
26771  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
26772  * f += 1 # <<<<<<<<<<<<<<
26773  * else:
26774  * # Cython ignores struct boundary information ("T{...}"),
26775  */
26776  __pyx_v_f = (__pyx_v_f + 1);
26777 
26778  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
26779  * offset[0] += child.itemsize
26780  *
26781  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
26782  * t = child.type_num
26783  * if end - f < 5:
26784  */
26785  goto __pyx_L13;
26786  }
26787 
26788  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906
26789  * # Cython ignores struct boundary information ("T{...}"),
26790  * # so don't output it
26791  * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
26792  * return f
26793  *
26794  */
26795  /*else*/ {
26796  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error)
26797  __pyx_v_f = __pyx_t_9;
26798  }
26799  __pyx_L13:;
26800 
26801  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
26802  * cdef tuple fields
26803  *
26804  * for childname in descr.names: # <<<<<<<<<<<<<<
26805  * fields = descr.fields[childname]
26806  * child, new_offset = fields
26807  */
26808  }
26809  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26810 
26811  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907
26812  * # so don't output it
26813  * f = _util_dtypestring(child, f, end, offset)
26814  * return f # <<<<<<<<<<<<<<
26815  *
26816  *
26817  */
26818  __pyx_r = __pyx_v_f;
26819  goto __pyx_L0;
26820 
26821  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
26822  * return ()
26823  *
26824  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
26825  * # Recursive utility function used in __getbuffer__ to get format
26826  * # string. The new location in the format string is returned.
26827  */
26828 
26829  /* function exit code */
26830  __pyx_L1_error:;
26831  __Pyx_XDECREF(__pyx_t_1);
26832  __Pyx_XDECREF(__pyx_t_3);
26833  __Pyx_XDECREF(__pyx_t_4);
26834  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
26835  __pyx_r = NULL;
26836  __pyx_L0:;
26837  __Pyx_XDECREF((PyObject *)__pyx_v_child);
26838  __Pyx_XDECREF(__pyx_v_fields);
26839  __Pyx_XDECREF(__pyx_v_childname);
26840  __Pyx_XDECREF(__pyx_v_new_offset);
26841  __Pyx_XDECREF(__pyx_v_t);
26842  __Pyx_RefNannyFinishContext();
26843  return __pyx_r;
26844 }
26845 
26846 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
26847  * int _import_umath() except -1
26848  *
26849  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
26850  * Py_INCREF(base) # important to do this before stealing the reference below!
26851  * PyArray_SetBaseObject(arr, base)
26852  */
26853 
26854 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
26855  __Pyx_RefNannyDeclarations
26856  __Pyx_RefNannySetupContext("set_array_base", 0);
26857 
26858  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023
26859  *
26860  * cdef inline void set_array_base(ndarray arr, object base):
26861  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
26862  * PyArray_SetBaseObject(arr, base)
26863  *
26864  */
26865  Py_INCREF(__pyx_v_base);
26866 
26867  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024
26868  * cdef inline void set_array_base(ndarray arr, object base):
26869  * Py_INCREF(base) # important to do this before stealing the reference below!
26870  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
26871  *
26872  * cdef inline object get_array_base(ndarray arr):
26873  */
26874  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
26875 
26876  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
26877  * int _import_umath() except -1
26878  *
26879  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
26880  * Py_INCREF(base) # important to do this before stealing the reference below!
26881  * PyArray_SetBaseObject(arr, base)
26882  */
26883 
26884  /* function exit code */
26885  __Pyx_RefNannyFinishContext();
26886 }
26887 
26888 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
26889  * PyArray_SetBaseObject(arr, base)
26890  *
26891  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
26892  * base = PyArray_BASE(arr)
26893  * if base is NULL:
26894  */
26895 
26896 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
26897  PyObject *__pyx_v_base;
26898  PyObject *__pyx_r = NULL;
26899  __Pyx_RefNannyDeclarations
26900  int __pyx_t_1;
26901  __Pyx_RefNannySetupContext("get_array_base", 0);
26902 
26903  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027
26904  *
26905  * cdef inline object get_array_base(ndarray arr):
26906  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
26907  * if base is NULL:
26908  * return None
26909  */
26910  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
26911 
26912  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
26913  * cdef inline object get_array_base(ndarray arr):
26914  * base = PyArray_BASE(arr)
26915  * if base is NULL: # <<<<<<<<<<<<<<
26916  * return None
26917  * return <object>base
26918  */
26919  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
26920  if (__pyx_t_1) {
26921 
26922  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029
26923  * base = PyArray_BASE(arr)
26924  * if base is NULL:
26925  * return None # <<<<<<<<<<<<<<
26926  * return <object>base
26927  *
26928  */
26929  __Pyx_XDECREF(__pyx_r);
26930  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26931  goto __pyx_L0;
26932 
26933  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
26934  * cdef inline object get_array_base(ndarray arr):
26935  * base = PyArray_BASE(arr)
26936  * if base is NULL: # <<<<<<<<<<<<<<
26937  * return None
26938  * return <object>base
26939  */
26940  }
26941 
26942  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030
26943  * if base is NULL:
26944  * return None
26945  * return <object>base # <<<<<<<<<<<<<<
26946  *
26947  * # Versions of the import_* functions which are more suitable for
26948  */
26949  __Pyx_XDECREF(__pyx_r);
26950  __Pyx_INCREF(((PyObject *)__pyx_v_base));
26951  __pyx_r = ((PyObject *)__pyx_v_base);
26952  goto __pyx_L0;
26953 
26954  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
26955  * PyArray_SetBaseObject(arr, base)
26956  *
26957  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
26958  * base = PyArray_BASE(arr)
26959  * if base is NULL:
26960  */
26961 
26962  /* function exit code */
26963  __pyx_L0:;
26964  __Pyx_XGIVEREF(__pyx_r);
26965  __Pyx_RefNannyFinishContext();
26966  return __pyx_r;
26967 }
26968 
26969 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
26970  * # Versions of the import_* functions which are more suitable for
26971  * # Cython code.
26972  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
26973  * try:
26974  * _import_array()
26975  */
26976 
26977 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
26978  int __pyx_r;
26979  __Pyx_RefNannyDeclarations
26980  PyObject *__pyx_t_1 = NULL;
26981  PyObject *__pyx_t_2 = NULL;
26982  PyObject *__pyx_t_3 = NULL;
26983  int __pyx_t_4;
26984  PyObject *__pyx_t_5 = NULL;
26985  PyObject *__pyx_t_6 = NULL;
26986  PyObject *__pyx_t_7 = NULL;
26987  PyObject *__pyx_t_8 = NULL;
26988  __Pyx_RefNannySetupContext("import_array", 0);
26989 
26990  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
26991  * # Cython code.
26992  * cdef inline int import_array() except -1:
26993  * try: # <<<<<<<<<<<<<<
26994  * _import_array()
26995  * except Exception:
26996  */
26997  {
26998  __Pyx_PyThreadState_declare
26999  __Pyx_PyThreadState_assign
27000  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27001  __Pyx_XGOTREF(__pyx_t_1);
27002  __Pyx_XGOTREF(__pyx_t_2);
27003  __Pyx_XGOTREF(__pyx_t_3);
27004  /*try:*/ {
27005 
27006  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036
27007  * cdef inline int import_array() except -1:
27008  * try:
27009  * _import_array() # <<<<<<<<<<<<<<
27010  * except Exception:
27011  * raise ImportError("numpy.core.multiarray failed to import")
27012  */
27013  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error)
27014 
27015  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27016  * # Cython code.
27017  * cdef inline int import_array() except -1:
27018  * try: # <<<<<<<<<<<<<<
27019  * _import_array()
27020  * except Exception:
27021  */
27022  }
27023  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27024  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27025  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27026  goto __pyx_L8_try_end;
27027  __pyx_L3_error:;
27028 
27029  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037
27030  * try:
27031  * _import_array()
27032  * except Exception: # <<<<<<<<<<<<<<
27033  * raise ImportError("numpy.core.multiarray failed to import")
27034  *
27035  */
27036  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27037  if (__pyx_t_4) {
27038  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27039  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error)
27040  __Pyx_GOTREF(__pyx_t_5);
27041  __Pyx_GOTREF(__pyx_t_6);
27042  __Pyx_GOTREF(__pyx_t_7);
27043 
27044  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
27045  * _import_array()
27046  * except Exception:
27047  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
27048  *
27049  * cdef inline int import_umath() except -1:
27050  */
27051  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error)
27052  __Pyx_GOTREF(__pyx_t_8);
27053  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27054  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27055  __PYX_ERR(2, 1038, __pyx_L5_except_error)
27056  }
27057  goto __pyx_L5_except_error;
27058  __pyx_L5_except_error:;
27059 
27060  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
27061  * # Cython code.
27062  * cdef inline int import_array() except -1:
27063  * try: # <<<<<<<<<<<<<<
27064  * _import_array()
27065  * except Exception:
27066  */
27067  __Pyx_XGIVEREF(__pyx_t_1);
27068  __Pyx_XGIVEREF(__pyx_t_2);
27069  __Pyx_XGIVEREF(__pyx_t_3);
27070  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27071  goto __pyx_L1_error;
27072  __pyx_L8_try_end:;
27073  }
27074 
27075  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
27076  * # Versions of the import_* functions which are more suitable for
27077  * # Cython code.
27078  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
27079  * try:
27080  * _import_array()
27081  */
27082 
27083  /* function exit code */
27084  __pyx_r = 0;
27085  goto __pyx_L0;
27086  __pyx_L1_error:;
27087  __Pyx_XDECREF(__pyx_t_5);
27088  __Pyx_XDECREF(__pyx_t_6);
27089  __Pyx_XDECREF(__pyx_t_7);
27090  __Pyx_XDECREF(__pyx_t_8);
27091  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
27092  __pyx_r = -1;
27093  __pyx_L0:;
27094  __Pyx_RefNannyFinishContext();
27095  return __pyx_r;
27096 }
27097 
27098 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
27099  * raise ImportError("numpy.core.multiarray failed to import")
27100  *
27101  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
27102  * try:
27103  * _import_umath()
27104  */
27105 
27106 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
27107  int __pyx_r;
27108  __Pyx_RefNannyDeclarations
27109  PyObject *__pyx_t_1 = NULL;
27110  PyObject *__pyx_t_2 = NULL;
27111  PyObject *__pyx_t_3 = NULL;
27112  int __pyx_t_4;
27113  PyObject *__pyx_t_5 = NULL;
27114  PyObject *__pyx_t_6 = NULL;
27115  PyObject *__pyx_t_7 = NULL;
27116  PyObject *__pyx_t_8 = NULL;
27117  __Pyx_RefNannySetupContext("import_umath", 0);
27118 
27119  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27120  *
27121  * cdef inline int import_umath() except -1:
27122  * try: # <<<<<<<<<<<<<<
27123  * _import_umath()
27124  * except Exception:
27125  */
27126  {
27127  __Pyx_PyThreadState_declare
27128  __Pyx_PyThreadState_assign
27129  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27130  __Pyx_XGOTREF(__pyx_t_1);
27131  __Pyx_XGOTREF(__pyx_t_2);
27132  __Pyx_XGOTREF(__pyx_t_3);
27133  /*try:*/ {
27134 
27135  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042
27136  * cdef inline int import_umath() except -1:
27137  * try:
27138  * _import_umath() # <<<<<<<<<<<<<<
27139  * except Exception:
27140  * raise ImportError("numpy.core.umath failed to import")
27141  */
27142  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error)
27143 
27144  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27145  *
27146  * cdef inline int import_umath() except -1:
27147  * try: # <<<<<<<<<<<<<<
27148  * _import_umath()
27149  * except Exception:
27150  */
27151  }
27152  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27153  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27154  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27155  goto __pyx_L8_try_end;
27156  __pyx_L3_error:;
27157 
27158  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043
27159  * try:
27160  * _import_umath()
27161  * except Exception: # <<<<<<<<<<<<<<
27162  * raise ImportError("numpy.core.umath failed to import")
27163  *
27164  */
27165  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27166  if (__pyx_t_4) {
27167  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
27168  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error)
27169  __Pyx_GOTREF(__pyx_t_5);
27170  __Pyx_GOTREF(__pyx_t_6);
27171  __Pyx_GOTREF(__pyx_t_7);
27172 
27173  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
27174  * _import_umath()
27175  * except Exception:
27176  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
27177  *
27178  * cdef inline int import_ufunc() except -1:
27179  */
27180  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error)
27181  __Pyx_GOTREF(__pyx_t_8);
27182  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27183  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27184  __PYX_ERR(2, 1044, __pyx_L5_except_error)
27185  }
27186  goto __pyx_L5_except_error;
27187  __pyx_L5_except_error:;
27188 
27189  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
27190  *
27191  * cdef inline int import_umath() except -1:
27192  * try: # <<<<<<<<<<<<<<
27193  * _import_umath()
27194  * except Exception:
27195  */
27196  __Pyx_XGIVEREF(__pyx_t_1);
27197  __Pyx_XGIVEREF(__pyx_t_2);
27198  __Pyx_XGIVEREF(__pyx_t_3);
27199  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27200  goto __pyx_L1_error;
27201  __pyx_L8_try_end:;
27202  }
27203 
27204  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
27205  * raise ImportError("numpy.core.multiarray failed to import")
27206  *
27207  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
27208  * try:
27209  * _import_umath()
27210  */
27211 
27212  /* function exit code */
27213  __pyx_r = 0;
27214  goto __pyx_L0;
27215  __pyx_L1_error:;
27216  __Pyx_XDECREF(__pyx_t_5);
27217  __Pyx_XDECREF(__pyx_t_6);
27218  __Pyx_XDECREF(__pyx_t_7);
27219  __Pyx_XDECREF(__pyx_t_8);
27220  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
27221  __pyx_r = -1;
27222  __pyx_L0:;
27223  __Pyx_RefNannyFinishContext();
27224  return __pyx_r;
27225 }
27226 
27227 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
27228  * raise ImportError("numpy.core.umath failed to import")
27229  *
27230  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
27231  * try:
27232  * _import_umath()
27233  */
27234 
27235 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
27236  int __pyx_r;
27237  __Pyx_RefNannyDeclarations
27238  PyObject *__pyx_t_1 = NULL;
27239  PyObject *__pyx_t_2 = NULL;
27240  PyObject *__pyx_t_3 = NULL;
27241  int __pyx_t_4;
27242  PyObject *__pyx_t_5 = NULL;
27243  PyObject *__pyx_t_6 = NULL;
27244  PyObject *__pyx_t_7 = NULL;
27245  PyObject *__pyx_t_8 = NULL;
27246  __Pyx_RefNannySetupContext("import_ufunc", 0);
27247 
27248  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
27249  *
27250  * cdef inline int import_ufunc() except -1:
27251  * try: # <<<<<<<<<<<<<<
27252  * _import_umath()
27253  * except Exception:
27254  */
27255  {
27256  __Pyx_PyThreadState_declare
27257  __Pyx_PyThreadState_assign
27258  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
27259  __Pyx_XGOTREF(__pyx_t_1);
27260  __Pyx_XGOTREF(__pyx_t_2);
27261  __Pyx_XGOTREF(__pyx_t_3);
27262  /*try:*/ {
27263 
27264  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048
27265  * cdef inline int import_ufunc() except -1:
27266  * try:
27267  * _import_umath() # <<<<<<<<<<<<<<
27268  * except Exception:
27269  * raise ImportError("numpy.core.umath failed to import")
27270  */
27271  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error)
27272 
27273  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
27274  *
27275  * cdef inline int import_ufunc() except -1:
27276  * try: # <<<<<<<<<<<<<<
27277  * _import_umath()
27278  * except Exception:
27279  */
27280  }
27281  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27282  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27283  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
27284  goto __pyx_L8_try_end;
27285  __pyx_L3_error:;
27286 
27287  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049
27288  * try:
27289  * _import_umath()
27290  * except Exception: # <<<<<<<<<<<<<<
27291  * raise ImportError("numpy.core.umath failed to import")
27292  */
27293  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
27294  if (__pyx_t_4) {
27295  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
27296  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error)
27297  __Pyx_GOTREF(__pyx_t_5);
27298  __Pyx_GOTREF(__pyx_t_6);
27299  __Pyx_GOTREF(__pyx_t_7);
27300 
27301  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050
27302  * _import_umath()
27303  * except Exception:
27304  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
27305  */
27306  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error)
27307  __Pyx_GOTREF(__pyx_t_8);
27308  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
27309  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27310  __PYX_ERR(2, 1050, __pyx_L5_except_error)
27311  }
27312  goto __pyx_L5_except_error;
27313  __pyx_L5_except_error:;
27314 
27315  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
27316  *
27317  * cdef inline int import_ufunc() except -1:
27318  * try: # <<<<<<<<<<<<<<
27319  * _import_umath()
27320  * except Exception:
27321  */
27322  __Pyx_XGIVEREF(__pyx_t_1);
27323  __Pyx_XGIVEREF(__pyx_t_2);
27324  __Pyx_XGIVEREF(__pyx_t_3);
27325  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
27326  goto __pyx_L1_error;
27327  __pyx_L8_try_end:;
27328  }
27329 
27330  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
27331  * raise ImportError("numpy.core.umath failed to import")
27332  *
27333  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
27334  * try:
27335  * _import_umath()
27336  */
27337 
27338  /* function exit code */
27339  __pyx_r = 0;
27340  goto __pyx_L0;
27341  __pyx_L1_error:;
27342  __Pyx_XDECREF(__pyx_t_5);
27343  __Pyx_XDECREF(__pyx_t_6);
27344  __Pyx_XDECREF(__pyx_t_7);
27345  __Pyx_XDECREF(__pyx_t_8);
27346  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
27347  __pyx_r = -1;
27348  __pyx_L0:;
27349  __Pyx_RefNannyFinishContext();
27350  return __pyx_r;
27351 }
27352 
27353 static PyObject *__pyx_tp_new_3ADR_ADR(PyTypeObject *t, PyObject *a, PyObject *k) {
27354  PyObject *o;
27355  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
27356  o = (*t->tp_alloc)(t, 0);
27357  } else {
27358  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
27359  }
27360  if (unlikely(!o)) return 0;
27361  if (unlikely(__pyx_pw_3ADR_3ADR_1__cinit__(o, a, k) < 0)) goto bad;
27362  return o;
27363  bad:
27364  Py_DECREF(o); o = 0;
27365  return NULL;
27366 }
27367 
27368 static void __pyx_tp_dealloc_3ADR_ADR(PyObject *o) {
27369  #if CYTHON_USE_TP_FINALIZE
27370  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
27371  if (PyObject_CallFinalizerFromDealloc(o)) return;
27372  }
27373  #endif
27374  {
27375  PyObject *etype, *eval, *etb;
27376  PyErr_Fetch(&etype, &eval, &etb);
27377  ++Py_REFCNT(o);
27378  __pyx_pw_3ADR_3ADR_3__dealloc__(o);
27379  --Py_REFCNT(o);
27380  PyErr_Restore(etype, eval, etb);
27381  }
27382  (*Py_TYPE(o)->tp_free)(o);
27383 }
27384 
27385 static PyMethodDef __pyx_methods_3ADR_ADR[] = {
27386  {"calculateResidual", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_3ADR_5calculateResidual, METH_VARARGS|METH_KEYWORDS, 0},
27387  {"calculateJacobian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3ADR_3ADR_7calculateJacobian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3ADR_3ADR_6calculateJacobian},
27388  {"__reduce_cython__", (PyCFunction)__pyx_pw_3ADR_3ADR_9__reduce_cython__, METH_NOARGS, 0},
27389  {"__setstate_cython__", (PyCFunction)__pyx_pw_3ADR_3ADR_11__setstate_cython__, METH_O, 0},
27390  {0, 0, 0, 0}
27391 };
27392 
27393 static PyTypeObject __pyx_type_3ADR_ADR = {
27394  PyVarObject_HEAD_INIT(0, 0)
27395  "ADR.ADR", /*tp_name*/
27396  sizeof(struct __pyx_obj_3ADR_ADR), /*tp_basicsize*/
27397  0, /*tp_itemsize*/
27398  __pyx_tp_dealloc_3ADR_ADR, /*tp_dealloc*/
27399  0, /*tp_print*/
27400  0, /*tp_getattr*/
27401  0, /*tp_setattr*/
27402  #if PY_MAJOR_VERSION < 3
27403  0, /*tp_compare*/
27404  #endif
27405  #if PY_MAJOR_VERSION >= 3
27406  0, /*tp_as_async*/
27407  #endif
27408  0, /*tp_repr*/
27409  0, /*tp_as_number*/
27410  0, /*tp_as_sequence*/
27411  0, /*tp_as_mapping*/
27412  0, /*tp_hash*/
27413  0, /*tp_call*/
27414  0, /*tp_str*/
27415  0, /*tp_getattro*/
27416  0, /*tp_setattro*/
27417  0, /*tp_as_buffer*/
27418  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
27419  "\n Optimized ADR member functions\n ", /*tp_doc*/
27420  0, /*tp_traverse*/
27421  0, /*tp_clear*/
27422  0, /*tp_richcompare*/
27423  0, /*tp_weaklistoffset*/
27424  0, /*tp_iter*/
27425  0, /*tp_iternext*/
27426  __pyx_methods_3ADR_ADR, /*tp_methods*/
27427  0, /*tp_members*/
27428  0, /*tp_getset*/
27429  0, /*tp_base*/
27430  0, /*tp_dict*/
27431  0, /*tp_descr_get*/
27432  0, /*tp_descr_set*/
27433  0, /*tp_dictoffset*/
27434  0, /*tp_init*/
27435  0, /*tp_alloc*/
27436  __pyx_tp_new_3ADR_ADR, /*tp_new*/
27437  0, /*tp_free*/
27438  0, /*tp_is_gc*/
27439  0, /*tp_bases*/
27440  0, /*tp_mro*/
27441  0, /*tp_cache*/
27442  0, /*tp_subclasses*/
27443  0, /*tp_weaklist*/
27444  0, /*tp_del*/
27445  0, /*tp_version_tag*/
27446  #if PY_VERSION_HEX >= 0x030400a1
27447  0, /*tp_finalize*/
27448  #endif
27449 };
27450 
27451 static PyMethodDef __pyx_methods[] = {
27452  {0, 0, 0, 0}
27453 };
27454 
27455 #if PY_MAJOR_VERSION >= 3
27456 #if CYTHON_PEP489_MULTI_PHASE_INIT
27457 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
27458 static int __pyx_pymod_exec_ADR(PyObject* module); /*proto*/
27459 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
27460  {Py_mod_create, (void*)__pyx_pymod_create},
27461  {Py_mod_exec, (void*)__pyx_pymod_exec_ADR},
27462  {0, NULL}
27463 };
27464 #endif
27465 
27466 static struct PyModuleDef __pyx_moduledef = {
27467  PyModuleDef_HEAD_INIT,
27468  "ADR",
27469  __pyx_k_An_optimized_Advection_Diffusio, /* m_doc */
27470  #if CYTHON_PEP489_MULTI_PHASE_INIT
27471  0, /* m_size */
27472  #else
27473  -1, /* m_size */
27474  #endif
27475  __pyx_methods /* m_methods */,
27476  #if CYTHON_PEP489_MULTI_PHASE_INIT
27477  __pyx_moduledef_slots, /* m_slots */
27478  #else
27479  NULL, /* m_reload */
27480  #endif
27481  NULL, /* m_traverse */
27482  NULL, /* m_clear */
27483  NULL /* m_free */
27484 };
27485 #endif
27486 #ifndef CYTHON_SMALL_CODE
27487 #if defined(__clang__)
27488  #define CYTHON_SMALL_CODE
27489 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
27490  #define CYTHON_SMALL_CODE __attribute__((cold))
27491 #else
27492  #define CYTHON_SMALL_CODE
27493 #endif
27494 #endif
27495 
27496 static __Pyx_StringTabEntry __pyx_string_tab[] = {
27497  {&__pyx_n_s_ADR, __pyx_k_ADR, sizeof(__pyx_k_ADR), 0, 0, 1, 1},
27498  {&__pyx_kp_s_ADR_ShockCapturing_lagging_reque, __pyx_k_ADR_ShockCapturing_lagging_reque, sizeof(__pyx_k_ADR_ShockCapturing_lagging_reque), 0, 0, 1, 0},
27499  {&__pyx_kp_s_ADR_ShockCapturing_switched_to_l, __pyx_k_ADR_ShockCapturing_switched_to_l, sizeof(__pyx_k_ADR_ShockCapturing_switched_to_l), 0, 0, 1, 0},
27500  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi, __pyx_k_Advection_DiagonalUpwind_Diffusi, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi), 0, 0, 1, 1},
27501  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi_2, __pyx_k_Advection_DiagonalUpwind_Diffusi_2, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi_2), 0, 0, 1, 1},
27502  {&__pyx_n_s_Advection_DiagonalUpwind_Diffusi_3, __pyx_k_Advection_DiagonalUpwind_Diffusi_3, sizeof(__pyx_k_Advection_DiagonalUpwind_Diffusi_3), 0, 0, 1, 1},
27503  {&__pyx_n_s_Archiver, __pyx_k_Archiver, sizeof(__pyx_k_Archiver), 0, 0, 1, 1},
27504  {&__pyx_kp_s_Building_time_integration_object, __pyx_k_Building_time_integration_object, sizeof(__pyx_k_Building_time_integration_object), 0, 0, 1, 0},
27505  {&__pyx_n_s_C0_AffineLinearOnSimplexWithNoda, __pyx_k_C0_AffineLinearOnSimplexWithNoda, sizeof(__pyx_k_C0_AffineLinearOnSimplexWithNoda), 0, 0, 1, 1},
27506  {&__pyx_n_s_CT_sge, __pyx_k_CT_sge, sizeof(__pyx_k_CT_sge), 0, 0, 1, 1},
27507  {&__pyx_kp_s_Calculating_numerical_quadrature, __pyx_k_Calculating_numerical_quadrature, sizeof(__pyx_k_Calculating_numerical_quadrature), 0, 0, 1, 0},
27508  {&__pyx_n_s_Coefficients, __pyx_k_Coefficients, sizeof(__pyx_k_Coefficients), 0, 0, 1, 1},
27509  {&__pyx_n_s_Coefficients___init, __pyx_k_Coefficients___init, sizeof(__pyx_k_Coefficients___init), 0, 0, 1, 1},
27510  {&__pyx_n_s_Coefficients_evaluate, __pyx_k_Coefficients_evaluate, sizeof(__pyx_k_Coefficients_evaluate), 0, 0, 1, 1},
27511  {&__pyx_n_s_Coefficients_initializeElementBo, __pyx_k_Coefficients_initializeElementBo, sizeof(__pyx_k_Coefficients_initializeElementBo), 0, 0, 1, 1},
27512  {&__pyx_n_s_Coefficients_initializeElementQu, __pyx_k_Coefficients_initializeElementQu, sizeof(__pyx_k_Coefficients_initializeElementQu), 0, 0, 1, 1},
27513  {&__pyx_n_s_Coefficients_initializeGlobalExt, __pyx_k_Coefficients_initializeGlobalExt, sizeof(__pyx_k_Coefficients_initializeGlobalExt), 0, 0, 1, 1},
27514  {&__pyx_kp_s_Coefficients_of_linear_ADR_equa, __pyx_k_Coefficients_of_linear_ADR_equa, sizeof(__pyx_k_Coefficients_of_linear_ADR_equa), 0, 0, 1, 0},
27515  {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1},
27516  {&__pyx_n_s_CompKernelFlag, __pyx_k_CompKernelFlag, sizeof(__pyx_k_CompKernelFlag), 0, 0, 1, 1},
27517  {&__pyx_n_s_DOFBoundaryConditions, __pyx_k_DOFBoundaryConditions, sizeof(__pyx_k_DOFBoundaryConditions), 0, 0, 1, 1},
27518  {&__pyx_n_s_FluxBoundaryConditions, __pyx_k_FluxBoundaryConditions, sizeof(__pyx_k_FluxBoundaryConditions), 0, 0, 1, 1},
27519  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
27520  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
27521  {&__pyx_kp_s_Global_residual, __pyx_k_Global_residual, sizeof(__pyx_k_Global_residual), 0, 0, 1, 0},
27522  {&__pyx_n_s_Hess, __pyx_k_Hess, sizeof(__pyx_k_Hess), 0, 0, 1, 1},
27523  {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
27524  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
27525  {&__pyx_kp_s_Jacobian, __pyx_k_Jacobian, sizeof(__pyx_k_Jacobian), 0, 0, 1, 0},
27526  {&__pyx_n_s_L2projectEvaluate, __pyx_k_L2projectEvaluate, sizeof(__pyx_k_L2projectEvaluate), 0, 0, 1, 1},
27527  {&__pyx_n_s_LevelModel, __pyx_k_LevelModel, sizeof(__pyx_k_LevelModel), 0, 0, 1, 1},
27528  {&__pyx_n_s_LevelModel___init, __pyx_k_LevelModel___init, sizeof(__pyx_k_LevelModel___init), 0, 0, 1, 1},
27529  {&__pyx_n_s_LevelModel_calculateAuxiliaryQua, __pyx_k_LevelModel_calculateAuxiliaryQua, sizeof(__pyx_k_LevelModel_calculateAuxiliaryQua), 0, 0, 1, 1},
27530  {&__pyx_n_s_LevelModel_calculateCoefficients, __pyx_k_LevelModel_calculateCoefficients, sizeof(__pyx_k_LevelModel_calculateCoefficients), 0, 0, 1, 1},
27531  {&__pyx_n_s_LevelModel_calculateElementBound, __pyx_k_LevelModel_calculateElementBound, sizeof(__pyx_k_LevelModel_calculateElementBound), 0, 0, 1, 1},
27532  {&__pyx_n_s_LevelModel_calculateElementQuadr, __pyx_k_LevelModel_calculateElementQuadr, sizeof(__pyx_k_LevelModel_calculateElementQuadr), 0, 0, 1, 1},
27533  {&__pyx_n_s_LevelModel_calculateExteriorElem, __pyx_k_LevelModel_calculateExteriorElem, sizeof(__pyx_k_LevelModel_calculateExteriorElem), 0, 0, 1, 1},
27534  {&__pyx_n_s_LevelModel_calculateSolutionAtQu, __pyx_k_LevelModel_calculateSolutionAtQu, sizeof(__pyx_k_LevelModel_calculateSolutionAtQu), 0, 0, 1, 1},
27535  {&__pyx_n_s_LevelModel_estimate_mt, __pyx_k_LevelModel_estimate_mt, sizeof(__pyx_k_LevelModel_estimate_mt), 0, 0, 1, 1},
27536  {&__pyx_n_s_LevelModel_getJacobian, __pyx_k_LevelModel_getJacobian, sizeof(__pyx_k_LevelModel_getJacobian), 0, 0, 1, 1},
27537  {&__pyx_n_s_LevelModel_getResidual, __pyx_k_LevelModel_getResidual, sizeof(__pyx_k_LevelModel_getResidual), 0, 0, 1, 1},
27538  {&__pyx_n_s_MOVING_DOMAIN, __pyx_k_MOVING_DOMAIN, sizeof(__pyx_k_MOVING_DOMAIN), 0, 0, 1, 1},
27539  {&__pyx_kp_s_Mass_Conservation_Error, __pyx_k_Mass_Conservation_Error, sizeof(__pyx_k_Mass_Conservation_Error), 0, 0, 1, 0},
27540  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
27541  {&__pyx_n_s_NonlinearEquation, __pyx_k_NonlinearEquation, sizeof(__pyx_k_NonlinearEquation), 0, 0, 1, 1},
27542  {&__pyx_n_s_NumericalFlux, __pyx_k_NumericalFlux, sizeof(__pyx_k_NumericalFlux), 0, 0, 1, 1},
27543  {&__pyx_n_s_NumericalFlux_IIPG, __pyx_k_NumericalFlux_IIPG, sizeof(__pyx_k_NumericalFlux_IIPG), 0, 0, 1, 1},
27544  {&__pyx_n_s_NumericalFlux_IIPG___init, __pyx_k_NumericalFlux_IIPG___init, sizeof(__pyx_k_NumericalFlux_IIPG___init), 0, 0, 1, 1},
27545  {&__pyx_n_s_NumericalFlux_NIPG, __pyx_k_NumericalFlux_NIPG, sizeof(__pyx_k_NumericalFlux_NIPG), 0, 0, 1, 1},
27546  {&__pyx_n_s_NumericalFlux_NIPG___init, __pyx_k_NumericalFlux_NIPG___init, sizeof(__pyx_k_NumericalFlux_NIPG___init), 0, 0, 1, 1},
27547  {&__pyx_n_s_NumericalFlux_SIPG, __pyx_k_NumericalFlux_SIPG, sizeof(__pyx_k_NumericalFlux_SIPG), 0, 0, 1, 1},
27548  {&__pyx_n_s_NumericalFlux_SIPG___init, __pyx_k_NumericalFlux_SIPG___init, sizeof(__pyx_k_NumericalFlux_SIPG___init), 0, 0, 1, 1},
27549  {&__pyx_n_s_OneLevelTransport, __pyx_k_OneLevelTransport, sizeof(__pyx_k_OneLevelTransport), 0, 0, 1, 1},
27550  {&__pyx_kp_s_Optimized_LevelModel_for_ADR_eq, __pyx_k_Optimized_LevelModel_for_ADR_eq, sizeof(__pyx_k_Optimized_LevelModel_for_ADR_eq), 0, 0, 1, 0},
27551  {&__pyx_n_s_PostProcessingTools, __pyx_k_PostProcessingTools, sizeof(__pyx_k_PostProcessingTools), 0, 0, 1, 1},
27552  {&__pyx_n_s_Quadrature, __pyx_k_Quadrature, sizeof(__pyx_k_Quadrature), 0, 0, 1, 1},
27553  {&__pyx_kp_s_Residual_based_shock_capturing, __pyx_k_Residual_based_shock_capturing, sizeof(__pyx_k_Residual_based_shock_capturing), 0, 0, 1, 0},
27554  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
27555  {&__pyx_n_s_SGE_base, __pyx_k_SGE_base, sizeof(__pyx_k_SGE_base), 0, 0, 1, 1},
27556  {&__pyx_n_s_ShockCapturing, __pyx_k_ShockCapturing, sizeof(__pyx_k_ShockCapturing), 0, 0, 1, 1},
27557  {&__pyx_n_s_ShockCapturing___init, __pyx_k_ShockCapturing___init, sizeof(__pyx_k_ShockCapturing___init), 0, 0, 1, 1},
27558  {&__pyx_n_s_ShockCapturing_base, __pyx_k_ShockCapturing_base, sizeof(__pyx_k_ShockCapturing_base), 0, 0, 1, 1},
27559  {&__pyx_n_s_ShockCapturing_initializeElement, __pyx_k_ShockCapturing_initializeElement, sizeof(__pyx_k_ShockCapturing_initializeElement), 0, 0, 1, 1},
27560  {&__pyx_n_s_ShockCapturing_updateShockCaptur, __pyx_k_ShockCapturing_updateShockCaptur, sizeof(__pyx_k_ShockCapturing_updateShockCaptur), 0, 0, 1, 1},
27561  {&__pyx_n_s_SimplexLobattoQuadrature, __pyx_k_SimplexLobattoQuadrature, sizeof(__pyx_k_SimplexLobattoQuadrature), 0, 0, 1, 1},
27562  {&__pyx_n_s_SubgridError, __pyx_k_SubgridError, sizeof(__pyx_k_SubgridError), 0, 0, 1, 1},
27563  {&__pyx_n_s_SubgridError___init, __pyx_k_SubgridError___init, sizeof(__pyx_k_SubgridError___init), 0, 0, 1, 1},
27564  {&__pyx_kp_s_SubgridError_approximation_for, __pyx_k_SubgridError_approximation_for, sizeof(__pyx_k_SubgridError_approximation_for), 0, 0, 1, 0},
27565  {&__pyx_n_s_SubgridError_calculateSubgridErr, __pyx_k_SubgridError_calculateSubgridErr, sizeof(__pyx_k_SubgridError_calculateSubgridErr), 0, 0, 1, 1},
27566  {&__pyx_n_s_SubgridError_initializeElementQu, __pyx_k_SubgridError_initializeElementQu, sizeof(__pyx_k_SubgridError_initializeElementQu), 0, 0, 1, 1},
27567  {&__pyx_n_s_SubgridError_updateSubgridErrorH, __pyx_k_SubgridError_updateSubgridErrorH, sizeof(__pyx_k_SubgridError_updateSubgridErrorH), 0, 0, 1, 1},
27568  {&__pyx_n_s_TC_base, __pyx_k_TC_base, sizeof(__pyx_k_TC_base), 0, 0, 1, 1},
27569  {&__pyx_n_s_TimeIntegration, __pyx_k_TimeIntegration, sizeof(__pyx_k_TimeIntegration), 0, 0, 1, 1},
27570  {&__pyx_n_s_TimeIntegrationClass, __pyx_k_TimeIntegrationClass, sizeof(__pyx_k_TimeIntegrationClass), 0, 0, 1, 1},
27571  {&__pyx_n_s_Transport, __pyx_k_Transport, sizeof(__pyx_k_Transport), 0, 0, 1, 1},
27572  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
27573  {&__pyx_kp_s_Updating_local_to_global_mapping, __pyx_k_Updating_local_to_global_mapping, sizeof(__pyx_k_Updating_local_to_global_mapping), 0, 0, 1, 0},
27574  {&__pyx_kp_s_VOF_max_numDiff_e, __pyx_k_VOF_max_numDiff_e, sizeof(__pyx_k_VOF_max_numDiff_e), 0, 0, 1, 0},
27575  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
27576  {&__pyx_n_s_VelocityPostProcessingChooser, __pyx_k_VelocityPostProcessingChooser, sizeof(__pyx_k_VelocityPostProcessingChooser), 0, 0, 1, 1},
27577  {&__pyx_n_s_XdmfWriter, __pyx_k_XdmfWriter, sizeof(__pyx_k_XdmfWriter), 0, 0, 1, 1},
27578  {&__pyx_kp_s_You_must_use_a_numerical_flux_to, __pyx_k_You_must_use_a_numerical_flux_to, sizeof(__pyx_k_You_must_use_a_numerical_flux_to), 0, 0, 1, 0},
27579  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
27580  {&__pyx_n_s_aOfX, __pyx_k_aOfX, sizeof(__pyx_k_aOfX), 0, 0, 1, 1},
27581  {&__pyx_n_s_adjoint_sigma, __pyx_k_adjoint_sigma, sizeof(__pyx_k_adjoint_sigma), 0, 0, 1, 1},
27582  {&__pyx_n_s_adr, __pyx_k_adr, sizeof(__pyx_k_adr), 0, 0, 1, 1},
27583  {&__pyx_n_s_advection, __pyx_k_advection, sizeof(__pyx_k_advection), 0, 0, 1, 1},
27584  {&__pyx_n_s_advectiveFluxBoundaryConditionsD, __pyx_k_advectiveFluxBoundaryConditionsD, sizeof(__pyx_k_advectiveFluxBoundaryConditionsD), 0, 0, 1, 1},
27585  {&__pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_k_advectiveFluxBoundaryConditionsS, sizeof(__pyx_k_advectiveFluxBoundaryConditionsS), 0, 0, 1, 1},
27586  {&__pyx_n_s_advectiveFlux_bc, __pyx_k_advectiveFlux_bc, sizeof(__pyx_k_advectiveFlux_bc), 0, 0, 1, 1},
27587  {&__pyx_n_s_advectiveFlux_bc_flag, __pyx_k_advectiveFlux_bc_flag, sizeof(__pyx_k_advectiveFlux_bc_flag), 0, 0, 1, 1},
27588  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
27589  {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1},
27590  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
27591  {&__pyx_n_s_boundaryAdjoint_sigma, __pyx_k_boundaryAdjoint_sigma, sizeof(__pyx_k_boundaryAdjoint_sigma), 0, 0, 1, 1},
27592  {&__pyx_n_s_boundaryJac_ref, __pyx_k_boundaryJac_ref, sizeof(__pyx_k_boundaryJac_ref), 0, 0, 1, 1},
27593  {&__pyx_n_s_boundaryJacobians, __pyx_k_boundaryJacobians, sizeof(__pyx_k_boundaryJacobians), 0, 0, 1, 1},
27594  {&__pyx_n_s_boundaryNormals, __pyx_k_boundaryNormals, sizeof(__pyx_k_boundaryNormals), 0, 0, 1, 1},
27595  {&__pyx_n_s_buildUnion, __pyx_k_buildUnion, sizeof(__pyx_k_buildUnion), 0, 0, 1, 1},
27596  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
27597  {&__pyx_n_s_calculateAuxiliaryQuantitiesAfte, __pyx_k_calculateAuxiliaryQuantitiesAfte, sizeof(__pyx_k_calculateAuxiliaryQuantitiesAfte), 0, 0, 1, 1},
27598  {&__pyx_n_s_calculateCoefficients, __pyx_k_calculateCoefficients, sizeof(__pyx_k_calculateCoefficients), 0, 0, 1, 1},
27599  {&__pyx_n_s_calculateElementBoundaryQuadratu, __pyx_k_calculateElementBoundaryQuadratu, sizeof(__pyx_k_calculateElementBoundaryQuadratu), 0, 0, 1, 1},
27600  {&__pyx_n_s_calculateElementQuadrature, __pyx_k_calculateElementQuadrature, sizeof(__pyx_k_calculateElementQuadrature), 0, 0, 1, 1},
27601  {&__pyx_n_s_calculateExteriorElementBoundary, __pyx_k_calculateExteriorElementBoundary, sizeof(__pyx_k_calculateExteriorElementBoundary), 0, 0, 1, 1},
27602  {&__pyx_n_s_calculateJacobian, __pyx_k_calculateJacobian, sizeof(__pyx_k_calculateJacobian), 0, 0, 1, 1},
27603  {&__pyx_n_s_calculateQuadrature, __pyx_k_calculateQuadrature, sizeof(__pyx_k_calculateQuadrature), 0, 0, 1, 1},
27604  {&__pyx_n_s_calculateResidual, __pyx_k_calculateResidual, sizeof(__pyx_k_calculateResidual), 0, 0, 1, 1},
27605  {&__pyx_n_s_calculateSolutionAtQuadrature, __pyx_k_calculateSolutionAtQuadrature, sizeof(__pyx_k_calculateSolutionAtQuadrature), 0, 0, 1, 1},
27606  {&__pyx_n_s_calculateSubgridError, __pyx_k_calculateSubgridError, sizeof(__pyx_k_calculateSubgridError), 0, 0, 1, 1},
27607  {&__pyx_n_s_cebq, __pyx_k_cebq, sizeof(__pyx_k_cebq), 0, 0, 1, 1},
27608  {&__pyx_n_s_cebq_global, __pyx_k_cebq_global, sizeof(__pyx_k_cebq_global), 0, 0, 1, 1},
27609  {&__pyx_n_s_cebqe, __pyx_k_cebqe, sizeof(__pyx_k_cebqe), 0, 0, 1, 1},
27610  {&__pyx_n_s_cfemIntegrals, __pyx_k_cfemIntegrals, sizeof(__pyx_k_cfemIntegrals), 0, 0, 1, 1},
27611  {&__pyx_n_s_cfl, __pyx_k_cfl, sizeof(__pyx_k_cfl), 0, 0, 1, 1},
27612  {&__pyx_n_s_ci, __pyx_k_ci, sizeof(__pyx_k_ci), 0, 0, 1, 1},
27613  {&__pyx_n_s_cj, __pyx_k_cj, sizeof(__pyx_k_cj), 0, 0, 1, 1},
27614  {&__pyx_n_s_ck, __pyx_k_ck, sizeof(__pyx_k_ck), 0, 0, 1, 1},
27615  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
27616  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
27617  {&__pyx_n_s_coefficients, __pyx_k_coefficients, sizeof(__pyx_k_coefficients), 0, 0, 1, 1},
27618  {&__pyx_n_s_comm, __pyx_k_comm, sizeof(__pyx_k_comm), 0, 0, 1, 1},
27619  {&__pyx_n_s_compKernelFlag, __pyx_k_compKernelFlag, sizeof(__pyx_k_compKernelFlag), 0, 0, 1, 1},
27620  {&__pyx_n_s_components, __pyx_k_components, sizeof(__pyx_k_components), 0, 0, 1, 1},
27621  {&__pyx_n_s_conservativeFlux, __pyx_k_conservativeFlux, sizeof(__pyx_k_conservativeFlux), 0, 0, 1, 1},
27622  {&__pyx_n_s_conservativeFluxDict, __pyx_k_conservativeFluxDict, sizeof(__pyx_k_conservativeFluxDict), 0, 0, 1, 1},
27623  {&__pyx_n_s_constant, __pyx_k_constant, sizeof(__pyx_k_constant), 0, 0, 1, 1},
27624  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
27625  {&__pyx_n_s_cq, __pyx_k_cq, sizeof(__pyx_k_cq), 0, 0, 1, 1},
27626  {&__pyx_n_s_csrColumnOffsets, __pyx_k_csrColumnOffsets, sizeof(__pyx_k_csrColumnOffsets), 0, 0, 1, 1},
27627  {&__pyx_n_s_csrColumnOffsets_eb, __pyx_k_csrColumnOffsets_eb, sizeof(__pyx_k_csrColumnOffsets_eb), 0, 0, 1, 1},
27628  {&__pyx_n_s_csrColumnOffsets_eb_u_u, __pyx_k_csrColumnOffsets_eb_u_u, sizeof(__pyx_k_csrColumnOffsets_eb_u_u), 0, 0, 1, 1},
27629  {&__pyx_n_s_csrColumnOffsets_u_u, __pyx_k_csrColumnOffsets_u_u, sizeof(__pyx_k_csrColumnOffsets_u_u), 0, 0, 1, 1},
27630  {&__pyx_n_s_csrRowIndeces, __pyx_k_csrRowIndeces, sizeof(__pyx_k_csrRowIndeces), 0, 0, 1, 1},
27631  {&__pyx_n_s_csrRowIndeces_u_u, __pyx_k_csrRowIndeces_u_u, sizeof(__pyx_k_csrRowIndeces_u_u), 0, 0, 1, 1},
27632  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
27633  {&__pyx_n_s_dS_ref, __pyx_k_dS_ref, sizeof(__pyx_k_dS_ref), 0, 0, 1, 1},
27634  {&__pyx_n_s_dV_ref, __pyx_k_dV_ref, sizeof(__pyx_k_dV_ref), 0, 0, 1, 1},
27635  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
27636  {&__pyx_n_s_dc, __pyx_k_dc, sizeof(__pyx_k_dc), 0, 0, 1, 1},
27637  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
27638  {&__pyx_n_s_defaultName, __pyx_k_defaultName, sizeof(__pyx_k_defaultName), 0, 0, 1, 1},
27639  {&__pyx_n_s_df, __pyx_k_df, sizeof(__pyx_k_df), 0, 0, 1, 1},
27640  {&__pyx_n_s_diffusion, __pyx_k_diffusion, sizeof(__pyx_k_diffusion), 0, 0, 1, 1},
27641  {&__pyx_n_s_diffusionDict, __pyx_k_diffusionDict, sizeof(__pyx_k_diffusionDict), 0, 0, 1, 1},
27642  {&__pyx_n_s_diffusiveFluxBoundaryConditionsD, __pyx_k_diffusiveFluxBoundaryConditionsD, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsD), 0, 0, 1, 1},
27643  {&__pyx_n_s_diffusiveFluxBoundaryConditionsD_2, __pyx_k_diffusiveFluxBoundaryConditionsD_2, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsD_2), 0, 0, 1, 1},
27644  {&__pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_k_diffusiveFluxBoundaryConditionsS, sizeof(__pyx_k_diffusiveFluxBoundaryConditionsS), 0, 0, 1, 1},
27645  {&__pyx_n_s_diffusiveFlux_bc, __pyx_k_diffusiveFlux_bc, sizeof(__pyx_k_diffusiveFlux_bc), 0, 0, 1, 1},
27646  {&__pyx_n_s_diffusiveFlux_bc_flag, __pyx_k_diffusiveFlux_bc_flag, sizeof(__pyx_k_diffusiveFlux_bc_flag), 0, 0, 1, 1},
27647  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
27648  {&__pyx_n_s_dirichletConditions, __pyx_k_dirichletConditions, sizeof(__pyx_k_dirichletConditions), 0, 0, 1, 1},
27649  {&__pyx_n_s_dirichletConditionsForceDOF, __pyx_k_dirichletConditionsForceDOF, sizeof(__pyx_k_dirichletConditionsForceDOF), 0, 0, 1, 1},
27650  {&__pyx_n_s_dirichletNodeSetList, __pyx_k_dirichletNodeSetList, sizeof(__pyx_k_dirichletNodeSetList), 0, 0, 1, 1},
27651  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
27652  {&__pyx_n_s_dof, __pyx_k_dof, sizeof(__pyx_k_dof), 0, 0, 1, 1},
27653  {&__pyx_n_s_dofBoundaryConditionsDict, __pyx_k_dofBoundaryConditionsDict, sizeof(__pyx_k_dofBoundaryConditionsDict), 0, 0, 1, 1},
27654  {&__pyx_n_s_dofBoundaryConditionsSetterDict, __pyx_k_dofBoundaryConditionsSetterDict, sizeof(__pyx_k_dofBoundaryConditionsSetterDict), 0, 0, 1, 1},
27655  {&__pyx_n_s_dofMap, __pyx_k_dofMap, sizeof(__pyx_k_dofMap), 0, 0, 1, 1},
27656  {&__pyx_n_s_dphi, __pyx_k_dphi, sizeof(__pyx_k_dphi), 0, 0, 1, 1},
27657  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
27658  {&__pyx_n_s_eN_global, __pyx_k_eN_global, sizeof(__pyx_k_eN_global), 0, 0, 1, 1},
27659  {&__pyx_n_s_ebN, __pyx_k_ebN, sizeof(__pyx_k_ebN), 0, 0, 1, 1},
27660  {&__pyx_n_s_ebNE, __pyx_k_ebNE, sizeof(__pyx_k_ebNE), 0, 0, 1, 1},
27661  {&__pyx_n_s_ebN_element, __pyx_k_ebN_element, sizeof(__pyx_k_ebN_element), 0, 0, 1, 1},
27662  {&__pyx_n_s_ebq, __pyx_k_ebq, sizeof(__pyx_k_ebq), 0, 0, 1, 1},
27663  {&__pyx_n_s_ebq_global, __pyx_k_ebq_global, sizeof(__pyx_k_ebq_global), 0, 0, 1, 1},
27664  {&__pyx_n_s_ebqe, __pyx_k_ebqe, sizeof(__pyx_k_ebqe), 0, 0, 1, 1},
27665  {&__pyx_n_s_ebqe_a, __pyx_k_ebqe_a, sizeof(__pyx_k_ebqe_a), 0, 0, 1, 1},
27666  {&__pyx_n_s_ebqe_bc_advectiveFlux_u_ext, __pyx_k_ebqe_bc_advectiveFlux_u_ext, sizeof(__pyx_k_ebqe_bc_advectiveFlux_u_ext), 0, 0, 1, 1},
27667  {&__pyx_n_s_ebqe_bc_flux_u_ext, __pyx_k_ebqe_bc_flux_u_ext, sizeof(__pyx_k_ebqe_bc_flux_u_ext), 0, 0, 1, 1},
27668  {&__pyx_n_s_ebqe_bc_u_ext, __pyx_k_ebqe_bc_u_ext, sizeof(__pyx_k_ebqe_bc_u_ext), 0, 0, 1, 1},
27669  {&__pyx_n_s_ebqe_penalty, __pyx_k_ebqe_penalty, sizeof(__pyx_k_ebqe_penalty), 0, 0, 1, 1},
27670  {&__pyx_n_s_ebqe_v, __pyx_k_ebqe_v, sizeof(__pyx_k_ebqe_v), 0, 0, 1, 1},
27671  {&__pyx_n_s_elemQuadIsDict, __pyx_k_elemQuadIsDict, sizeof(__pyx_k_elemQuadIsDict), 0, 0, 1, 1},
27672  {&__pyx_n_s_elementBoundaryDiametersArray, __pyx_k_elementBoundaryDiametersArray, sizeof(__pyx_k_elementBoundaryDiametersArray), 0, 0, 1, 1},
27673  {&__pyx_n_s_elementBoundaryElementsArray, __pyx_k_elementBoundaryElementsArray, sizeof(__pyx_k_elementBoundaryElementsArray), 0, 0, 1, 1},
27674  {&__pyx_n_s_elementBoundaryIntegralKeys, __pyx_k_elementBoundaryIntegralKeys, sizeof(__pyx_k_elementBoundaryIntegralKeys), 0, 0, 1, 1},
27675  {&__pyx_n_s_elementBoundaryIntegrals, __pyx_k_elementBoundaryIntegrals, sizeof(__pyx_k_elementBoundaryIntegrals), 0, 0, 1, 1},
27676  {&__pyx_n_s_elementBoundaryLocalElementBound, __pyx_k_elementBoundaryLocalElementBound, sizeof(__pyx_k_elementBoundaryLocalElementBound), 0, 0, 1, 1},
27677  {&__pyx_n_s_elementBoundaryQuadrature, __pyx_k_elementBoundaryQuadrature, sizeof(__pyx_k_elementBoundaryQuadrature), 0, 0, 1, 1},
27678  {&__pyx_n_s_elementBoundaryQuadratureDict, __pyx_k_elementBoundaryQuadratureDict, sizeof(__pyx_k_elementBoundaryQuadratureDict), 0, 0, 1, 1},
27679  {&__pyx_n_s_elementBoundaryQuadratureDiction, __pyx_k_elementBoundaryQuadratureDiction, sizeof(__pyx_k_elementBoundaryQuadratureDiction), 0, 0, 1, 1},
27680  {&__pyx_n_s_elementBoundaryQuadraturePoints, __pyx_k_elementBoundaryQuadraturePoints, sizeof(__pyx_k_elementBoundaryQuadraturePoints), 0, 0, 1, 1},
27681  {&__pyx_n_s_elementBoundaryQuadratureRuleInd, __pyx_k_elementBoundaryQuadratureRuleInd, sizeof(__pyx_k_elementBoundaryQuadratureRuleInd), 0, 0, 1, 1},
27682  {&__pyx_n_s_elementBoundaryQuadratureWeights, __pyx_k_elementBoundaryQuadratureWeights, sizeof(__pyx_k_elementBoundaryQuadratureWeights), 0, 0, 1, 1},
27683  {&__pyx_n_s_elementDiameter, __pyx_k_elementDiameter, sizeof(__pyx_k_elementDiameter), 0, 0, 1, 1},
27684  {&__pyx_n_s_elementDiametersArray, __pyx_k_elementDiametersArray, sizeof(__pyx_k_elementDiametersArray), 0, 0, 1, 1},
27685  {&__pyx_n_s_elementEffectiveDiametersArray, __pyx_k_elementEffectiveDiametersArray, sizeof(__pyx_k_elementEffectiveDiametersArray), 0, 0, 1, 1},
27686  {&__pyx_n_s_elementInnerDiametersArray, __pyx_k_elementInnerDiametersArray, sizeof(__pyx_k_elementInnerDiametersArray), 0, 0, 1, 1},
27687  {&__pyx_n_s_elementIntegralKeys, __pyx_k_elementIntegralKeys, sizeof(__pyx_k_elementIntegralKeys), 0, 0, 1, 1},
27688  {&__pyx_n_s_elementMaps, __pyx_k_elementMaps, sizeof(__pyx_k_elementMaps), 0, 0, 1, 1},
27689  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
27690  {&__pyx_n_s_elementQuadrature, __pyx_k_elementQuadrature, sizeof(__pyx_k_elementQuadrature), 0, 0, 1, 1},
27691  {&__pyx_n_s_elementQuadratureDict, __pyx_k_elementQuadratureDict, sizeof(__pyx_k_elementQuadratureDict), 0, 0, 1, 1},
27692  {&__pyx_n_s_elementQuadratureDictionaryWrite, __pyx_k_elementQuadratureDictionaryWrite, sizeof(__pyx_k_elementQuadratureDictionaryWrite), 0, 0, 1, 1},
27693  {&__pyx_n_s_elementQuadraturePoints, __pyx_k_elementQuadraturePoints, sizeof(__pyx_k_elementQuadraturePoints), 0, 0, 1, 1},
27694  {&__pyx_n_s_elementQuadratureRuleIndeces, __pyx_k_elementQuadratureRuleIndeces, sizeof(__pyx_k_elementQuadratureRuleIndeces), 0, 0, 1, 1},
27695  {&__pyx_n_s_elementQuadratureWeights, __pyx_k_elementQuadratureWeights, sizeof(__pyx_k_elementQuadratureWeights), 0, 0, 1, 1},
27696  {&__pyx_kp_s_element_and_element_boundary_Jac, __pyx_k_element_and_element_boundary_Jac, sizeof(__pyx_k_element_and_element_boundary_Jac), 0, 0, 1, 0},
27697  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
27698  {&__pyx_n_s_estimate_mt, __pyx_k_estimate_mt, sizeof(__pyx_k_estimate_mt), 0, 0, 1, 1},
27699  {&__pyx_n_s_evaluate, __pyx_k_evaluate, sizeof(__pyx_k_evaluate), 0, 0, 1, 1},
27700  {&__pyx_n_s_exteriorElementBoundariesArray, __pyx_k_exteriorElementBoundariesArray, sizeof(__pyx_k_exteriorElementBoundariesArray), 0, 0, 1, 1},
27701  {&__pyx_n_s_exteriorElementBoundaryQuadratur, __pyx_k_exteriorElementBoundaryQuadratur, sizeof(__pyx_k_exteriorElementBoundaryQuadratur), 0, 0, 1, 1},
27702  {&__pyx_n_s_fOfX, __pyx_k_fOfX, sizeof(__pyx_k_fOfX), 0, 0, 1, 1},
27703  {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1},
27704  {&__pyx_n_s_fbcObject, __pyx_k_fbcObject, sizeof(__pyx_k_fbcObject), 0, 0, 1, 1},
27705  {&__pyx_n_s_femSpace, __pyx_k_femSpace, sizeof(__pyx_k_femSpace), 0, 0, 1, 1},
27706  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
27707  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
27708  {&__pyx_n_s_flat, __pyx_k_flat, sizeof(__pyx_k_flat), 0, 0, 1, 1},
27709  {&__pyx_n_s_fluxBoundaryConditions, __pyx_k_fluxBoundaryConditions, sizeof(__pyx_k_fluxBoundaryConditions), 0, 0, 1, 1},
27710  {&__pyx_n_s_fluxBoundaryConditionsDict, __pyx_k_fluxBoundaryConditionsDict, sizeof(__pyx_k_fluxBoundaryConditionsDict), 0, 0, 1, 1},
27711  {&__pyx_n_s_fluxBoundaryConditionsObjectsDic, __pyx_k_fluxBoundaryConditionsObjectsDic, sizeof(__pyx_k_fluxBoundaryConditionsObjectsDic), 0, 0, 1, 1},
27712  {&__pyx_n_s_forceStrongConditions, __pyx_k_forceStrongConditions, sizeof(__pyx_k_forceStrongConditions), 0, 0, 1, 1},
27713  {&__pyx_n_s_forceStrongDirichlet, __pyx_k_forceStrongDirichlet, sizeof(__pyx_k_forceStrongDirichlet), 0, 0, 1, 1},
27714  {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
27715  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
27716  {&__pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_k_getAdvectiveFluxBoundaryConditio, sizeof(__pyx_k_getAdvectiveFluxBoundaryConditio), 0, 0, 1, 1},
27717  {&__pyx_n_s_getBasisGradientValuesRef, __pyx_k_getBasisGradientValuesRef, sizeof(__pyx_k_getBasisGradientValuesRef), 0, 0, 1, 1},
27718  {&__pyx_n_s_getBasisGradientValuesTraceRef, __pyx_k_getBasisGradientValuesTraceRef, sizeof(__pyx_k_getBasisGradientValuesTraceRef), 0, 0, 1, 1},
27719  {&__pyx_n_s_getBasisValuesRef, __pyx_k_getBasisValuesRef, sizeof(__pyx_k_getBasisValuesRef), 0, 0, 1, 1},
27720  {&__pyx_n_s_getBasisValuesTraceRef, __pyx_k_getBasisValuesTraceRef, sizeof(__pyx_k_getBasisValuesTraceRef), 0, 0, 1, 1},
27721  {&__pyx_n_s_getCSRrepresentation, __pyx_k_getCSRrepresentation, sizeof(__pyx_k_getCSRrepresentation), 0, 0, 1, 1},
27722  {&__pyx_n_s_getDiffusiveFluxBoundaryConditio, __pyx_k_getDiffusiveFluxBoundaryConditio, sizeof(__pyx_k_getDiffusiveFluxBoundaryConditio), 0, 0, 1, 1},
27723  {&__pyx_n_s_getJacobian, __pyx_k_getJacobian, sizeof(__pyx_k_getJacobian), 0, 0, 1, 1},
27724  {&__pyx_n_s_getPointwiseBoundaryConditions, __pyx_k_getPointwiseBoundaryConditions, sizeof(__pyx_k_getPointwiseBoundaryConditions), 0, 0, 1, 1},
27725  {&__pyx_n_s_getResidual, __pyx_k_getResidual, sizeof(__pyx_k_getResidual), 0, 0, 1, 1},
27726  {&__pyx_n_s_getValues, __pyx_k_getValues, sizeof(__pyx_k_getValues), 0, 0, 1, 1},
27727  {&__pyx_n_s_getValuesGlobalExteriorTrace, __pyx_k_getValuesGlobalExteriorTrace, sizeof(__pyx_k_getValuesGlobalExteriorTrace), 0, 0, 1, 1},
27728  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
27729  {&__pyx_n_s_globalJacobian, __pyx_k_globalJacobian, sizeof(__pyx_k_globalJacobian), 0, 0, 1, 1},
27730  {&__pyx_n_s_globalMax, __pyx_k_globalMax, sizeof(__pyx_k_globalMax), 0, 0, 1, 1},
27731  {&__pyx_n_s_globalResidual, __pyx_k_globalResidual, sizeof(__pyx_k_globalResidual), 0, 0, 1, 1},
27732  {&__pyx_n_s_globalSum, __pyx_k_globalSum, sizeof(__pyx_k_globalSum), 0, 0, 1, 1},
27733  {&__pyx_n_s_grad_psi, __pyx_k_grad_psi, sizeof(__pyx_k_grad_psi), 0, 0, 1, 1},
27734  {&__pyx_n_s_grad_psi_trace, __pyx_k_grad_psi_trace, sizeof(__pyx_k_grad_psi_trace), 0, 0, 1, 1},
27735  {&__pyx_kp_s_grad_u, __pyx_k_grad_u, sizeof(__pyx_k_grad_u), 0, 0, 1, 0},
27736  {&__pyx_n_s_hamiltonian, __pyx_k_hamiltonian, sizeof(__pyx_k_hamiltonian), 0, 0, 1, 1},
27737  {&__pyx_n_s_has_key, __pyx_k_has_key, sizeof(__pyx_k_has_key), 0, 0, 1, 1},
27738  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
27739  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
27740  {&__pyx_kp_s_inflowBC_internalNodes_updateLoc, __pyx_k_inflowBC_internalNodes_updateLoc, sizeof(__pyx_k_inflowBC_internalNodes_updateLoc), 0, 0, 1, 0},
27741  {&__pyx_n_s_inflowBoundaryBC, __pyx_k_inflowBoundaryBC, sizeof(__pyx_k_inflowBoundaryBC), 0, 0, 1, 1},
27742  {&__pyx_n_s_inflowBoundaryBC_values, __pyx_k_inflowBoundaryBC_values, sizeof(__pyx_k_inflowBoundaryBC_values), 0, 0, 1, 1},
27743  {&__pyx_n_s_inflowFlux, __pyx_k_inflowFlux, sizeof(__pyx_k_inflowFlux), 0, 0, 1, 1},
27744  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
27745  {&__pyx_n_s_initializationPhase, __pyx_k_initializationPhase, sizeof(__pyx_k_initializationPhase), 0, 0, 1, 1},
27746  {&__pyx_n_s_initializeElementBoundaryQuadrat, __pyx_k_initializeElementBoundaryQuadrat, sizeof(__pyx_k_initializeElementBoundaryQuadrat), 0, 0, 1, 1},
27747  {&__pyx_n_s_initializeElementQuadrature, __pyx_k_initializeElementQuadrature, sizeof(__pyx_k_initializeElementQuadrature), 0, 0, 1, 1},
27748  {&__pyx_n_s_initializeGlobalExteriorElementB, __pyx_k_initializeGlobalExteriorElementB, sizeof(__pyx_k_initializeGlobalExteriorElementB), 0, 0, 1, 1},
27749  {&__pyx_n_s_initializeMesh, __pyx_k_initializeMesh, sizeof(__pyx_k_initializeMesh), 0, 0, 1, 1},
27750  {&__pyx_n_s_initializeTimeIntegration, __pyx_k_initializeTimeIntegration, sizeof(__pyx_k_initializeTimeIntegration), 0, 0, 1, 1},
27751  {&__pyx_n_s_integrateInterpolationPoints, __pyx_k_integrateInterpolationPoints, sizeof(__pyx_k_integrateInterpolationPoints), 0, 0, 1, 1},
27752  {&__pyx_n_s_internalNodes, __pyx_k_internalNodes, sizeof(__pyx_k_internalNodes), 0, 0, 1, 1},
27753  {&__pyx_n_s_internalNodesArray, __pyx_k_internalNodesArray, sizeof(__pyx_k_internalNodesArray), 0, 0, 1, 1},
27754  {&__pyx_n_s_interpolationConditions, __pyx_k_interpolationConditions, sizeof(__pyx_k_interpolationConditions), 0, 0, 1, 1},
27755  {&__pyx_n_s_isAdvectiveFluxBoundary_u, __pyx_k_isAdvectiveFluxBoundary_u, sizeof(__pyx_k_isAdvectiveFluxBoundary_u), 0, 0, 1, 1},
27756  {&__pyx_n_s_isDOFBoundary, __pyx_k_isDOFBoundary, sizeof(__pyx_k_isDOFBoundary), 0, 0, 1, 1},
27757  {&__pyx_n_s_isDOFBoundary_u, __pyx_k_isDOFBoundary_u, sizeof(__pyx_k_isDOFBoundary_u), 0, 0, 1, 1},
27758  {&__pyx_n_s_isFluxBoundary_u, __pyx_k_isFluxBoundary_u, sizeof(__pyx_k_isFluxBoundary_u), 0, 0, 1, 1},
27759  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
27760  {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1},
27761  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
27762  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
27763  {&__pyx_n_s_l2g, __pyx_k_l2g, sizeof(__pyx_k_l2g), 0, 0, 1, 1},
27764  {&__pyx_n_s_l2proj, __pyx_k_l2proj, sizeof(__pyx_k_l2proj), 0, 0, 1, 1},
27765  {&__pyx_n_s_lag, __pyx_k_lag, sizeof(__pyx_k_lag), 0, 0, 1, 1},
27766  {&__pyx_n_s_lag_shockCapturing, __pyx_k_lag_shockCapturing, sizeof(__pyx_k_lag_shockCapturing), 0, 0, 1, 1},
27767  {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
27768  {&__pyx_n_s_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 0, 1, 1},
27769  {&__pyx_n_s_localFunctionSpace, __pyx_k_localFunctionSpace, sizeof(__pyx_k_localFunctionSpace), 0, 0, 1, 1},
27770  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
27771  {&__pyx_n_s_logEvent, __pyx_k_logEvent, sizeof(__pyx_k_logEvent), 0, 0, 1, 1},
27772  {&__pyx_n_s_lowmem, __pyx_k_lowmem, sizeof(__pyx_k_lowmem), 0, 0, 1, 1},
27773  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
27774  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
27775  {&__pyx_n_s_mass, __pyx_k_mass, sizeof(__pyx_k_mass), 0, 0, 1, 1},
27776  {&__pyx_n_s_massConservationError, __pyx_k_massConservationError, sizeof(__pyx_k_massConservationError), 0, 0, 1, 1},
27777  {&__pyx_n_s_massLumping, __pyx_k_massLumping, sizeof(__pyx_k_massLumping), 0, 0, 1, 1},
27778  {&__pyx_n_s_matType, __pyx_k_matType, sizeof(__pyx_k_matType), 0, 0, 1, 1},
27779  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
27780  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
27781  {&__pyx_n_s_max_nDOF_element, __pyx_k_max_nDOF_element, sizeof(__pyx_k_max_nDOF_element), 0, 0, 1, 1},
27782  {&__pyx_n_s_memory, __pyx_k_memory, sizeof(__pyx_k_memory), 0, 0, 1, 1},
27783  {&__pyx_n_s_mesh, __pyx_k_mesh, sizeof(__pyx_k_mesh), 0, 0, 1, 1},
27784  {&__pyx_n_s_mesh_dof, __pyx_k_mesh_dof, sizeof(__pyx_k_mesh_dof), 0, 0, 1, 1},
27785  {&__pyx_n_s_mesh_grad_trial_ref, __pyx_k_mesh_grad_trial_ref, sizeof(__pyx_k_mesh_grad_trial_ref), 0, 0, 1, 1},
27786  {&__pyx_n_s_mesh_grad_trial_trace_ref, __pyx_k_mesh_grad_trial_trace_ref, sizeof(__pyx_k_mesh_grad_trial_trace_ref), 0, 0, 1, 1},
27787  {&__pyx_n_s_mesh_l2g, __pyx_k_mesh_l2g, sizeof(__pyx_k_mesh_l2g), 0, 0, 1, 1},
27788  {&__pyx_n_s_mesh_trial_ref, __pyx_k_mesh_trial_ref, sizeof(__pyx_k_mesh_trial_ref), 0, 0, 1, 1},
27789  {&__pyx_n_s_mesh_trial_trace_ref, __pyx_k_mesh_trial_trace_ref, sizeof(__pyx_k_mesh_trial_trace_ref), 0, 0, 1, 1},
27790  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
27791  {&__pyx_n_s_mixedFlow, __pyx_k_mixedFlow, sizeof(__pyx_k_mixedFlow), 0, 0, 1, 1},
27792  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
27793  {&__pyx_n_s_movingDomain, __pyx_k_movingDomain, sizeof(__pyx_k_movingDomain), 0, 0, 1, 1},
27794  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
27795  {&__pyx_n_s_nCalls, __pyx_k_nCalls, sizeof(__pyx_k_nCalls), 0, 0, 1, 1},
27796  {&__pyx_n_s_nDOF_mesh_trial_elementIn, __pyx_k_nDOF_mesh_trial_elementIn, sizeof(__pyx_k_nDOF_mesh_trial_elementIn), 0, 0, 1, 1},
27797  {&__pyx_n_s_nDOF_phi_trial_element, __pyx_k_nDOF_phi_trial_element, sizeof(__pyx_k_nDOF_phi_trial_element), 0, 0, 1, 1},
27798  {&__pyx_n_s_nDOF_test_element, __pyx_k_nDOF_test_element, sizeof(__pyx_k_nDOF_test_element), 0, 0, 1, 1},
27799  {&__pyx_n_s_nDOF_test_elementIn, __pyx_k_nDOF_test_elementIn, sizeof(__pyx_k_nDOF_test_elementIn), 0, 0, 1, 1},
27800  {&__pyx_n_s_nDOF_trial_element, __pyx_k_nDOF_trial_element, sizeof(__pyx_k_nDOF_trial_element), 0, 0, 1, 1},
27801  {&__pyx_n_s_nDOF_trial_elementIn, __pyx_k_nDOF_trial_elementIn, sizeof(__pyx_k_nDOF_trial_elementIn), 0, 0, 1, 1},
27802  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
27803  {&__pyx_n_s_nElementBoundaries_global, __pyx_k_nElementBoundaries_global, sizeof(__pyx_k_nElementBoundaries_global), 0, 0, 1, 1},
27804  {&__pyx_n_s_nElementBoundaryQuadraturePoints, __pyx_k_nElementBoundaryQuadraturePoints, sizeof(__pyx_k_nElementBoundaryQuadraturePoints), 0, 0, 1, 1},
27805  {&__pyx_n_s_nElementBoundaryQuadraturePoints_2, __pyx_k_nElementBoundaryQuadraturePoints_2, sizeof(__pyx_k_nElementBoundaryQuadraturePoints_2), 0, 0, 1, 1},
27806  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
27807  {&__pyx_n_s_nElements_owned, __pyx_k_nElements_owned, sizeof(__pyx_k_nElements_owned), 0, 0, 1, 1},
27808  {&__pyx_n_s_nExteriorElementBoundaries_globa, __pyx_k_nExteriorElementBoundaries_globa, sizeof(__pyx_k_nExteriorElementBoundaries_globa), 0, 0, 1, 1},
27809  {&__pyx_n_s_nFreeDOF_global, __pyx_k_nFreeDOF_global, sizeof(__pyx_k_nFreeDOF_global), 0, 0, 1, 1},
27810  {&__pyx_n_s_nFreeVDOF_global, __pyx_k_nFreeVDOF_global, sizeof(__pyx_k_nFreeVDOF_global), 0, 0, 1, 1},
27811  {&__pyx_n_s_nI, __pyx_k_nI, sizeof(__pyx_k_nI), 0, 0, 1, 1},
27812  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
27813  {&__pyx_n_s_nNodes_global, __pyx_k_nNodes_global, sizeof(__pyx_k_nNodes_global), 0, 0, 1, 1},
27814  {&__pyx_n_s_nNodes_internal, __pyx_k_nNodes_internal, sizeof(__pyx_k_nNodes_internal), 0, 0, 1, 1},
27815  {&__pyx_n_s_nNonzerosInJacobian, __pyx_k_nNonzerosInJacobian, sizeof(__pyx_k_nNonzerosInJacobian), 0, 0, 1, 1},
27816  {&__pyx_n_s_nQuadraturePoints, __pyx_k_nQuadraturePoints, sizeof(__pyx_k_nQuadraturePoints), 0, 0, 1, 1},
27817  {&__pyx_n_s_nQuadraturePoints_element, __pyx_k_nQuadraturePoints_element, sizeof(__pyx_k_nQuadraturePoints_element), 0, 0, 1, 1},
27818  {&__pyx_n_s_nQuadraturePoints_elementBoundar, __pyx_k_nQuadraturePoints_elementBoundar, sizeof(__pyx_k_nQuadraturePoints_elementBoundar), 0, 0, 1, 1},
27819  {&__pyx_n_s_nQuadraturePoints_elementIn, __pyx_k_nQuadraturePoints_elementIn, sizeof(__pyx_k_nQuadraturePoints_elementIn), 0, 0, 1, 1},
27820  {&__pyx_n_s_nQuadraturePoints_global, __pyx_k_nQuadraturePoints_global, sizeof(__pyx_k_nQuadraturePoints_global), 0, 0, 1, 1},
27821  {&__pyx_n_s_nSpaceIn, __pyx_k_nSpaceIn, sizeof(__pyx_k_nSpaceIn), 0, 0, 1, 1},
27822  {&__pyx_n_s_nSpace_global, __pyx_k_nSpace_global, sizeof(__pyx_k_nSpace_global), 0, 0, 1, 1},
27823  {&__pyx_n_s_nSteps, __pyx_k_nSteps, sizeof(__pyx_k_nSteps), 0, 0, 1, 1},
27824  {&__pyx_n_s_nStepsToDelay, __pyx_k_nStepsToDelay, sizeof(__pyx_k_nStepsToDelay), 0, 0, 1, 1},
27825  {&__pyx_n_s_nVDOF_element, __pyx_k_nVDOF_element, sizeof(__pyx_k_nVDOF_element), 0, 0, 1, 1},
27826  {&__pyx_n_s_n_phi_ip_element, __pyx_k_n_phi_ip_element, sizeof(__pyx_k_n_phi_ip_element), 0, 0, 1, 1},
27827  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
27828  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
27829  {&__pyx_n_s_nc, __pyx_k_nc, sizeof(__pyx_k_nc), 0, 0, 1, 1},
27830  {&__pyx_n_s_nd, __pyx_k_nd, sizeof(__pyx_k_nd), 0, 0, 1, 1},
27831  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
27832  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
27833  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
27834  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
27835  {&__pyx_n_s_nodeVelocityArray, __pyx_k_nodeVelocityArray, sizeof(__pyx_k_nodeVelocityArray), 0, 0, 1, 1},
27836  {&__pyx_n_s_nonlinear, __pyx_k_nonlinear, sizeof(__pyx_k_nonlinear), 0, 0, 1, 1},
27837  {&__pyx_n_s_nonlinear_function_evaluations, __pyx_k_nonlinear_function_evaluations, sizeof(__pyx_k_nonlinear_function_evaluations), 0, 0, 1, 1},
27838  {&__pyx_n_s_nonlinear_function_jacobian_eval, __pyx_k_nonlinear_function_jacobian_eval, sizeof(__pyx_k_nonlinear_function_jacobian_eval), 0, 0, 1, 1},
27839  {&__pyx_n_s_normal_ref, __pyx_k_normal_ref, sizeof(__pyx_k_normal_ref), 0, 0, 1, 1},
27840  {&__pyx_n_s_numDiff, __pyx_k_numDiff, sizeof(__pyx_k_numDiff), 0, 0, 1, 1},
27841  {&__pyx_n_s_numDiff_last, __pyx_k_numDiff_last, sizeof(__pyx_k_numDiff_last), 0, 0, 1, 1},
27842  {&__pyx_n_s_numericalFlux, __pyx_k_numericalFlux, sizeof(__pyx_k_numericalFlux), 0, 0, 1, 1},
27843  {&__pyx_n_s_numericalFluxType, __pyx_k_numericalFluxType, sizeof(__pyx_k_numericalFluxType), 0, 0, 1, 1},
27844  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
27845  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
27846  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
27847  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
27848  {&__pyx_n_s_offset_u, __pyx_k_offset_u, sizeof(__pyx_k_offset_u), 0, 0, 1, 1},
27849  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
27850  {&__pyx_n_s_outFlow, __pyx_k_outFlow, sizeof(__pyx_k_outFlow), 0, 0, 1, 1},
27851  {&__pyx_n_s_pdb, __pyx_k_pdb, sizeof(__pyx_k_pdb), 0, 0, 1, 1},
27852  {&__pyx_n_s_penalty, __pyx_k_penalty, sizeof(__pyx_k_penalty), 0, 0, 1, 1},
27853  {&__pyx_n_s_penalty_constant, __pyx_k_penalty_constant, sizeof(__pyx_k_penalty_constant), 0, 0, 1, 1},
27854  {&__pyx_n_s_penalty_power, __pyx_k_penalty_power, sizeof(__pyx_k_penalty_power), 0, 0, 1, 1},
27855  {&__pyx_n_s_periodicDirichletConditions, __pyx_k_periodicDirichletConditions, sizeof(__pyx_k_periodicDirichletConditions), 0, 0, 1, 1},
27856  {&__pyx_n_s_phi, __pyx_k_phi, sizeof(__pyx_k_phi), 0, 0, 1, 1},
27857  {&__pyx_n_s_phiDict, __pyx_k_phiDict, sizeof(__pyx_k_phiDict), 0, 0, 1, 1},
27858  {&__pyx_n_s_phiTrialIsTrial, __pyx_k_phiTrialIsTrial, sizeof(__pyx_k_phiTrialIsTrial), 0, 0, 1, 1},
27859  {&__pyx_n_s_phi_ip, __pyx_k_phi_ip, sizeof(__pyx_k_phi_ip), 0, 0, 1, 1},
27860  {&__pyx_n_s_phi_k, __pyx_k_phi_k, sizeof(__pyx_k_phi_k), 0, 0, 1, 1},
27861  {&__pyx_n_s_points_elementBoundaryQuadrature, __pyx_k_points_elementBoundaryQuadrature, sizeof(__pyx_k_points_elementBoundaryQuadrature), 0, 0, 1, 1},
27862  {&__pyx_n_s_potential, __pyx_k_potential, sizeof(__pyx_k_potential), 0, 0, 1, 1},
27863  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
27864  {&__pyx_n_s_proteus, __pyx_k_proteus, sizeof(__pyx_k_proteus), 0, 0, 1, 1},
27865  {&__pyx_kp_s_proteus_ADR_pyx, __pyx_k_proteus_ADR_pyx, sizeof(__pyx_k_proteus_ADR_pyx), 0, 0, 1, 0},
27866  {&__pyx_n_s_proteus_Comm, __pyx_k_proteus_Comm, sizeof(__pyx_k_proteus_Comm), 0, 0, 1, 1},
27867  {&__pyx_n_s_proteus_FemTools, __pyx_k_proteus_FemTools, sizeof(__pyx_k_proteus_FemTools), 0, 0, 1, 1},
27868  {&__pyx_n_s_proteus_NonlinearSolvers, __pyx_k_proteus_NonlinearSolvers, sizeof(__pyx_k_proteus_NonlinearSolvers), 0, 0, 1, 1},
27869  {&__pyx_n_s_proteus_Profiling, __pyx_k_proteus_Profiling, sizeof(__pyx_k_proteus_Profiling), 0, 0, 1, 1},
27870  {&__pyx_n_s_proteus_ShockCapturing, __pyx_k_proteus_ShockCapturing, sizeof(__pyx_k_proteus_ShockCapturing), 0, 0, 1, 1},
27871  {&__pyx_n_s_proteus_SubgridError, __pyx_k_proteus_SubgridError, sizeof(__pyx_k_proteus_SubgridError), 0, 0, 1, 1},
27872  {&__pyx_n_s_proteus_Transport, __pyx_k_proteus_Transport, sizeof(__pyx_k_proteus_Transport), 0, 0, 1, 1},
27873  {&__pyx_n_s_proteus_TransportCoefficients, __pyx_k_proteus_TransportCoefficients, sizeof(__pyx_k_proteus_TransportCoefficients), 0, 0, 1, 1},
27874  {&__pyx_n_s_proteus_ctransportCoefficients, __pyx_k_proteus_ctransportCoefficients, sizeof(__pyx_k_proteus_ctransportCoefficients), 0, 0, 1, 1},
27875  {&__pyx_n_s_psi, __pyx_k_psi, sizeof(__pyx_k_psi), 0, 0, 1, 1},
27876  {&__pyx_n_s_psi_trace, __pyx_k_psi_trace, sizeof(__pyx_k_psi_trace), 0, 0, 1, 1},
27877  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
27878  {&__pyx_n_s_q_a, __pyx_k_q_a, sizeof(__pyx_k_q_a), 0, 0, 1, 1},
27879  {&__pyx_n_s_q_numDiff_u, __pyx_k_q_numDiff_u, sizeof(__pyx_k_q_numDiff_u), 0, 0, 1, 1},
27880  {&__pyx_n_s_q_numDiff_u_last, __pyx_k_q_numDiff_u_last, sizeof(__pyx_k_q_numDiff_u_last), 0, 0, 1, 1},
27881  {&__pyx_n_s_q_r, __pyx_k_q_r, sizeof(__pyx_k_q_r), 0, 0, 1, 1},
27882  {&__pyx_n_s_q_v, __pyx_k_q_v, sizeof(__pyx_k_q_v), 0, 0, 1, 1},
27883  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
27884  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
27885  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
27886  {&__pyx_n_s_reaction, __pyx_k_reaction, sizeof(__pyx_k_reaction), 0, 0, 1, 1},
27887  {&__pyx_n_s_reactionLumping, __pyx_k_reactionLumping, sizeof(__pyx_k_reactionLumping), 0, 0, 1, 1},
27888  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
27889  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
27890  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
27891  {&__pyx_n_s_referenceFiniteElement, __pyx_k_referenceFiniteElement, sizeof(__pyx_k_referenceFiniteElement), 0, 0, 1, 1},
27892  {&__pyx_n_s_reuse_test_trial_quadrature, __pyx_k_reuse_test_trial_quadrature, sizeof(__pyx_k_reuse_test_trial_quadrature), 0, 0, 1, 1},
27893  {&__pyx_n_s_reuse_trial_and_test_quadrature, __pyx_k_reuse_trial_and_test_quadrature, sizeof(__pyx_k_reuse_trial_and_test_quadrature), 0, 0, 1, 1},
27894  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
27895  {&__pyx_n_s_sc_alpha, __pyx_k_sc_alpha, sizeof(__pyx_k_sc_alpha), 0, 0, 1, 1},
27896  {&__pyx_n_s_sc_beta, __pyx_k_sc_beta, sizeof(__pyx_k_sc_beta), 0, 0, 1, 1},
27897  {&__pyx_n_s_sc_uref, __pyx_k_sc_uref, sizeof(__pyx_k_sc_uref), 0, 0, 1, 1},
27898  {&__pyx_n_s_scalars_elementBoundaryQuadratur, __pyx_k_scalars_elementBoundaryQuadratur, sizeof(__pyx_k_scalars_elementBoundaryQuadratur), 0, 0, 1, 1},
27899  {&__pyx_n_s_sd, __pyx_k_sd, sizeof(__pyx_k_sd), 0, 0, 1, 1},
27900  {&__pyx_n_s_sdInfo, __pyx_k_sdInfo, sizeof(__pyx_k_sdInfo), 0, 0, 1, 1},
27901  {&__pyx_n_s_sdInfo_u_u_colind, __pyx_k_sdInfo_u_u_colind, sizeof(__pyx_k_sdInfo_u_u_colind), 0, 0, 1, 1},
27902  {&__pyx_n_s_sdInfo_u_u_rowptr, __pyx_k_sdInfo_u_u_rowptr, sizeof(__pyx_k_sdInfo_u_u_rowptr), 0, 0, 1, 1},
27903  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
27904  {&__pyx_n_s_setDirichletValues, __pyx_k_setDirichletValues, sizeof(__pyx_k_setDirichletValues), 0, 0, 1, 1},
27905  {&__pyx_n_s_setFlow, __pyx_k_setFlow, sizeof(__pyx_k_setFlow), 0, 0, 1, 1},
27906  {&__pyx_n_s_setFromOptions, __pyx_k_setFromOptions, sizeof(__pyx_k_setFromOptions), 0, 0, 1, 1},
27907  {&__pyx_n_s_setUnknowns, __pyx_k_setUnknowns, sizeof(__pyx_k_setUnknowns), 0, 0, 1, 1},
27908  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
27909  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
27910  {&__pyx_n_s_setupFieldStrides, __pyx_k_setupFieldStrides, sizeof(__pyx_k_setupFieldStrides), 0, 0, 1, 1},
27911  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
27912  {&__pyx_n_s_shockCapturing, __pyx_k_shockCapturing, sizeof(__pyx_k_shockCapturing), 0, 0, 1, 1},
27913  {&__pyx_n_s_shockCapturingDiffusion, __pyx_k_shockCapturingDiffusion, sizeof(__pyx_k_shockCapturingDiffusion), 0, 0, 1, 1},
27914  {&__pyx_n_s_shockCapturingFactor, __pyx_k_shockCapturingFactor, sizeof(__pyx_k_shockCapturingFactor), 0, 0, 1, 1},
27915  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
27916  {&__pyx_n_s_sparseDiffusionTensors, __pyx_k_sparseDiffusionTensors, sizeof(__pyx_k_sparseDiffusionTensors), 0, 0, 1, 1},
27917  {&__pyx_n_s_stab, __pyx_k_stab, sizeof(__pyx_k_stab), 0, 0, 1, 1},
27918  {&__pyx_n_s_stabilization, __pyx_k_stabilization, sizeof(__pyx_k_stabilization), 0, 0, 1, 1},
27919  {&__pyx_n_s_stabilizationIsNonlinear, __pyx_k_stabilizationIsNonlinear, sizeof(__pyx_k_stabilizationIsNonlinear), 0, 0, 1, 1},
27920  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
27921  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
27922  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
27923  {&__pyx_n_s_stressTraceBoundaryConditionsSet, __pyx_k_stressTraceBoundaryConditionsSet, sizeof(__pyx_k_stressTraceBoundaryConditionsSet), 0, 0, 1, 1},
27924  {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1},
27925  {&__pyx_kp_s_stride_offset, __pyx_k_stride_offset, sizeof(__pyx_k_stride_offset), 0, 0, 1, 0},
27926  {&__pyx_n_s_stride_u, __pyx_k_stride_u, sizeof(__pyx_k_stride_u), 0, 0, 1, 1},
27927  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
27928  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
27929  {&__pyx_n_s_tLast_mesh, __pyx_k_tLast_mesh, sizeof(__pyx_k_tLast_mesh), 0, 0, 1, 1},
27930  {&__pyx_n_s_tensors_elementBoundaryQuadratur, __pyx_k_tensors_elementBoundaryQuadratur, sizeof(__pyx_k_tensors_elementBoundaryQuadratur), 0, 0, 1, 1},
27931  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
27932  {&__pyx_n_s_testIsTrial, __pyx_k_testIsTrial, sizeof(__pyx_k_testIsTrial), 0, 0, 1, 1},
27933  {&__pyx_n_s_testSpace, __pyx_k_testSpace, sizeof(__pyx_k_testSpace), 0, 0, 1, 1},
27934  {&__pyx_n_s_testSpaceDict, __pyx_k_testSpaceDict, sizeof(__pyx_k_testSpaceDict), 0, 0, 1, 1},
27935  {&__pyx_n_s_timeIntegration, __pyx_k_timeIntegration, sizeof(__pyx_k_timeIntegration), 0, 0, 1, 1},
27936  {&__pyx_n_s_timeTerm, __pyx_k_timeTerm, sizeof(__pyx_k_timeTerm), 0, 0, 1, 1},
27937  {&__pyx_n_s_timeVaryingCoefficients, __pyx_k_timeVaryingCoefficients, sizeof(__pyx_k_timeVaryingCoefficients), 0, 0, 1, 1},
27938  {&__pyx_kp_s_to_reuse_test_trial_quad_all_fem, __pyx_k_to_reuse_test_trial_quad_all_fem, sizeof(__pyx_k_to_reuse_test_trial_quad_all_fem), 0, 0, 1, 0},
27939  {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
27940  {&__pyx_n_s_uDict, __pyx_k_uDict, sizeof(__pyx_k_uDict), 0, 0, 1, 1},
27941  {&__pyx_n_s_u_dof, __pyx_k_u_dof, sizeof(__pyx_k_u_dof), 0, 0, 1, 1},
27942  {&__pyx_n_s_u_grad_test_ref, __pyx_k_u_grad_test_ref, sizeof(__pyx_k_u_grad_test_ref), 0, 0, 1, 1},
27943  {&__pyx_n_s_u_grad_test_trace_ref, __pyx_k_u_grad_test_trace_ref, sizeof(__pyx_k_u_grad_test_trace_ref), 0, 0, 1, 1},
27944  {&__pyx_n_s_u_grad_trial_ref, __pyx_k_u_grad_trial_ref, sizeof(__pyx_k_u_grad_trial_ref), 0, 0, 1, 1},
27945  {&__pyx_n_s_u_grad_trial_trace_ref, __pyx_k_u_grad_trial_trace_ref, sizeof(__pyx_k_u_grad_trial_trace_ref), 0, 0, 1, 1},
27946  {&__pyx_n_s_u_j, __pyx_k_u_j, sizeof(__pyx_k_u_j), 0, 0, 1, 1},
27947  {&__pyx_n_s_u_l2g, __pyx_k_u_l2g, sizeof(__pyx_k_u_l2g), 0, 0, 1, 1},
27948  {&__pyx_n_s_u_test_ref, __pyx_k_u_test_ref, sizeof(__pyx_k_u_test_ref), 0, 0, 1, 1},
27949  {&__pyx_n_s_u_test_trace_ref, __pyx_k_u_test_trace_ref, sizeof(__pyx_k_u_test_trace_ref), 0, 0, 1, 1},
27950  {&__pyx_n_s_u_trial_ref, __pyx_k_u_trial_ref, sizeof(__pyx_k_u_trial_ref), 0, 0, 1, 1},
27951  {&__pyx_n_s_u_trial_trace_ref, __pyx_k_u_trial_trace_ref, sizeof(__pyx_k_u_trial_trace_ref), 0, 0, 1, 1},
27952  {&__pyx_n_s_ua, __pyx_k_ua, sizeof(__pyx_k_ua), 0, 0, 1, 1},
27953  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
27954  {&__pyx_n_s_updateLocal2Global, __pyx_k_updateLocal2Global, sizeof(__pyx_k_updateLocal2Global), 0, 0, 1, 1},
27955  {&__pyx_n_s_updateShockCapturingHistory, __pyx_k_updateShockCapturingHistory, sizeof(__pyx_k_updateShockCapturingHistory), 0, 0, 1, 1},
27956  {&__pyx_n_s_updateSubgridErrorHistory, __pyx_k_updateSubgridErrorHistory, sizeof(__pyx_k_updateSubgridErrorHistory), 0, 0, 1, 1},
27957  {&__pyx_n_s_useMetrics, __pyx_k_useMetrics, sizeof(__pyx_k_useMetrics), 0, 0, 1, 1},
27958  {&__pyx_n_s_useSparseDiffusion, __pyx_k_useSparseDiffusion, sizeof(__pyx_k_useSparseDiffusion), 0, 0, 1, 1},
27959  {&__pyx_n_s_useWeakDirichletConditions, __pyx_k_useWeakDirichletConditions, sizeof(__pyx_k_useWeakDirichletConditions), 0, 0, 1, 1},
27960  {&__pyx_n_s_usesGradientStabilization, __pyx_k_usesGradientStabilization, sizeof(__pyx_k_usesGradientStabilization), 0, 0, 1, 1},
27961  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
27962  {&__pyx_n_s_variableNames, __pyx_k_variableNames, sizeof(__pyx_k_variableNames), 0, 0, 1, 1},
27963  {&__pyx_n_s_vectors_elementBoundaryQuadratur, __pyx_k_vectors_elementBoundaryQuadratur, sizeof(__pyx_k_vectors_elementBoundaryQuadratur), 0, 0, 1, 1},
27964  {&__pyx_n_s_velocity, __pyx_k_velocity, sizeof(__pyx_k_velocity), 0, 0, 1, 1},
27965  {&__pyx_n_s_velocityPostProcessor, __pyx_k_velocityPostProcessor, sizeof(__pyx_k_velocityPostProcessor), 0, 0, 1, 1},
27966  {&__pyx_kp_s_velocity_postprocessor, __pyx_k_velocity_postprocessor, sizeof(__pyx_k_velocity_postprocessor), 0, 0, 1, 0},
27967  {&__pyx_n_s_vt, __pyx_k_vt, sizeof(__pyx_k_vt), 0, 0, 1, 1},
27968  {&__pyx_n_s_weakDirichletConditions, __pyx_k_weakDirichletConditions, sizeof(__pyx_k_weakDirichletConditions), 0, 0, 1, 1},
27969  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
27970  {&__pyx_n_s_zeroJacobian_CSR, __pyx_k_zeroJacobian_CSR, sizeof(__pyx_k_zeroJacobian_CSR), 0, 0, 1, 1},
27971  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
27972  {0, 0, 0, 0, 0, 0, 0}
27973 };
27974 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
27975  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
27976  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 422, __pyx_L1_error)
27977  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(1, 683, __pyx_L1_error)
27978  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 831, __pyx_L1_error)
27979  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error)
27980  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error)
27981  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error)
27982  return 0;
27983  __pyx_L1_error:;
27984  return -1;
27985 }
27986 
27987 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
27988  __Pyx_RefNannyDeclarations
27989  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
27990 
27991  /* "(tree fragment)":2
27992  * def __reduce_cython__(self):
27993  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
27994  * def __setstate_cython__(self, __pyx_state):
27995  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27996  */
27997  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error)
27998  __Pyx_GOTREF(__pyx_tuple_);
27999  __Pyx_GIVEREF(__pyx_tuple_);
28000 
28001  /* "(tree fragment)":4
28002  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
28003  * def __setstate_cython__(self, __pyx_state):
28004  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
28005  */
28006  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error)
28007  __Pyx_GOTREF(__pyx_tuple__2);
28008  __Pyx_GIVEREF(__pyx_tuple__2);
28009 
28010  /* "ADR.pyx":429
28011  * if self.lag:
28012  * for ci in range(self.nc):
28013  * self.numDiff_last[ci][:] = self.numDiff[ci] # <<<<<<<<<<<<<<
28014  * if self.lag == False and self.nStepsToDelay is not None and self.nSteps > self.nStepsToDelay:
28015  * log("ADR.ShockCapturing: switched to lagged shock capturing")
28016  */
28017  __pyx_slice__3 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(1, 429, __pyx_L1_error)
28018  __Pyx_GOTREF(__pyx_slice__3);
28019  __Pyx_GIVEREF(__pyx_slice__3);
28020 
28021  /* "ADR.pyx":500
28022  * potential[i] = {i : 'u'}
28023  * #end i
28024  * sdInfo = {(0,0):(numpy.arange(start=0,stop=self.nd**2+1,step=self.nd,dtype='i'), # <<<<<<<<<<<<<<
28025  * numpy.array([range(self.nd) for row in range(self.nd)],dtype='i'))}
28026  * TC_base.__init__(self,
28027  */
28028  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 500, __pyx_L1_error)
28029  __Pyx_GOTREF(__pyx_tuple__4);
28030  __Pyx_GIVEREF(__pyx_tuple__4);
28031 
28032  /* "ADR.pyx":519
28033  * if cq.has_key(('df',ci,ci)):
28034  * if self.velocity is not None:
28035  * cq[('df',ci,ci)][...,:] = self.velocity # <<<<<<<<<<<<<<
28036  * else:
28037  * cq[('df',ci,ci)].flat[:] = 0.0
28038  */
28039  __pyx_tuple__5 = PyTuple_Pack(2, Py_Ellipsis, __pyx_slice__3); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 519, __pyx_L1_error)
28040  __Pyx_GOTREF(__pyx_tuple__5);
28041  __Pyx_GIVEREF(__pyx_tuple__5);
28042 
28043  /* "ADR.pyx":707
28044  * if elemQuadIsDict:
28045  * if elementQuadrature.has_key(I):
28046  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature[I] # <<<<<<<<<<<<<<
28047  * else:
28048  * elementQuadratureDict[('stab',)+I[1:]] = elementQuadrature['default']
28049  */
28050  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_stab); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 707, __pyx_L1_error)
28051  __Pyx_GOTREF(__pyx_tuple__6);
28052  __Pyx_GIVEREF(__pyx_tuple__6);
28053  __pyx_slice__7 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(1, 707, __pyx_L1_error)
28054  __Pyx_GOTREF(__pyx_slice__7);
28055  __Pyx_GIVEREF(__pyx_slice__7);
28056 
28057  /* "ADR.pyx":787
28058  * self.q['x'] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,3),'d')
28059  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
28060  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
28061  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
28062  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
28063  */
28064  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_u, __pyx_int_0); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 787, __pyx_L1_error)
28065  __Pyx_GOTREF(__pyx_tuple__8);
28066  __Pyx_GIVEREF(__pyx_tuple__8);
28067 
28068  /* "ADR.pyx":788
28069  * self.ebqe['x'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,3),'d')
28070  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28071  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
28072  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
28073  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
28074  */
28075  __pyx_tuple__9 = PyTuple_Pack(2, __pyx_kp_s_grad_u, __pyx_int_0); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 788, __pyx_L1_error)
28076  __Pyx_GOTREF(__pyx_tuple__9);
28077  __Pyx_GIVEREF(__pyx_tuple__9);
28078 
28079  /* "ADR.pyx":789
28080  * self.q[('u',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28081  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
28082  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d') # <<<<<<<<<<<<<<
28083  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
28084  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28085  */
28086  __pyx_tuple__10 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 789, __pyx_L1_error)
28087  __Pyx_GOTREF(__pyx_tuple__10);
28088  __Pyx_GIVEREF(__pyx_tuple__10);
28089 
28090  /* "ADR.pyx":790
28091  * self.q[('grad(u)',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
28092  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
28093  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d') # <<<<<<<<<<<<<<
28094  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28095  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28096  */
28097  __pyx_tuple__11 = PyTuple_Pack(3, __pyx_n_s_df, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 790, __pyx_L1_error)
28098  __Pyx_GOTREF(__pyx_tuple__11);
28099  __Pyx_GIVEREF(__pyx_tuple__11);
28100 
28101  /* "ADR.pyx":791
28102  * self.q[('a',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
28103  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
28104  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
28105  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28106  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28107  */
28108  __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_r, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 791, __pyx_L1_error)
28109  __Pyx_GOTREF(__pyx_tuple__12);
28110  __Pyx_GIVEREF(__pyx_tuple__12);
28111 
28112  /* "ADR.pyx":792
28113  * self.q[('df',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element,self.nSpace_global),'d')
28114  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28115  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
28116  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28117  *
28118  */
28119  __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_cfl, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 792, __pyx_L1_error)
28120  __Pyx_GOTREF(__pyx_tuple__13);
28121  __Pyx_GIVEREF(__pyx_tuple__13);
28122 
28123  /* "ADR.pyx":793
28124  * self.q[('r',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28125  * self.q[('cfl',0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d')
28126  * self.q[('numDiff',0,0)] = numpy.zeros((self.mesh.nElements_global,self.nQuadraturePoints_element),'d') # <<<<<<<<<<<<<<
28127  *
28128  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28129  */
28130  __pyx_tuple__14 = PyTuple_Pack(3, __pyx_n_s_numDiff, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 793, __pyx_L1_error)
28131  __Pyx_GOTREF(__pyx_tuple__14);
28132  __Pyx_GIVEREF(__pyx_tuple__14);
28133 
28134  /* "ADR.pyx":797
28135  * self.ebqe['penalty'] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28136  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28137  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
28138  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28139  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
28140  */
28141  __pyx_tuple__15 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc_flag, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 797, __pyx_L1_error)
28142  __Pyx_GOTREF(__pyx_tuple__15);
28143  __Pyx_GIVEREF(__pyx_tuple__15);
28144 
28145  /* "ADR.pyx":798
28146  * self.ebqe[('u',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28147  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
28148  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
28149  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
28150  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28151  */
28152  __pyx_tuple__16 = PyTuple_Pack(3, __pyx_n_s_diffusiveFlux_bc, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 798, __pyx_L1_error)
28153  __Pyx_GOTREF(__pyx_tuple__16);
28154  __Pyx_GIVEREF(__pyx_tuple__16);
28155 
28156  /* "ADR.pyx":799
28157  * self.ebqe[('diffusiveFlux_bc_flag',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
28158  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28159  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i') # <<<<<<<<<<<<<<
28160  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28161  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
28162  */
28163  __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc_flag, __pyx_int_0); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 799, __pyx_L1_error)
28164  __Pyx_GOTREF(__pyx_tuple__17);
28165  __Pyx_GIVEREF(__pyx_tuple__17);
28166 
28167  /* "ADR.pyx":800
28168  * self.ebqe[('diffusiveFlux_bc',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d')
28169  * self.ebqe[('advectiveFlux_bc_flag',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'i')
28170  * self.ebqe[('advectiveFlux_bc',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary),'d') # <<<<<<<<<<<<<<
28171  * self.ebqe[('grad(u)',0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.nSpace_global),'d')
28172  * self.ebqe[('a',0,0)] = numpy.zeros((self.mesh.nExteriorElementBoundaries_global,self.nElementBoundaryQuadraturePoints_elementBoundary,self.coefficients.sdInfo[(0,0)][0][-1]),'d')
28173  */
28174  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_advectiveFlux_bc, __pyx_int_0); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 800, __pyx_L1_error)
28175  __Pyx_GOTREF(__pyx_tuple__18);
28176  __Pyx_GIVEREF(__pyx_tuple__18);
28177 
28178  /* "ADR.pyx":810
28179  * self.vectors_elementBoundaryQuadrature= set()
28180  * self.tensors_elementBoundaryQuadrature= set()
28181  * log(memory("element and element boundary Jacobians","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
28182  * self.inflowBoundaryBC = {}
28183  * self.inflowBoundaryBC_values = {}
28184  */
28185  __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_s_element_and_element_boundary_Jac, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 810, __pyx_L1_error)
28186  __Pyx_GOTREF(__pyx_tuple__19);
28187  __Pyx_GIVEREF(__pyx_tuple__19);
28188 
28189  /* "ADR.pyx":836
28190  * del self.internalNodes
28191  * self.internalNodes = None
28192  * log("Updating local to global mappings",2) # <<<<<<<<<<<<<<
28193  * self.updateLocal2Global()
28194  * log("Building time integration object",2)
28195  */
28196  __pyx_tuple__20 = PyTuple_Pack(2, __pyx_kp_s_Updating_local_to_global_mapping, __pyx_int_2); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 836, __pyx_L1_error)
28197  __Pyx_GOTREF(__pyx_tuple__20);
28198  __Pyx_GIVEREF(__pyx_tuple__20);
28199 
28200  /* "ADR.pyx":838
28201  * log("Updating local to global mappings",2)
28202  * self.updateLocal2Global()
28203  * log("Building time integration object",2) # <<<<<<<<<<<<<<
28204  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4)
28205  * #mwf for interpolating subgrid error for gradients etc
28206  */
28207  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_kp_s_Building_time_integration_object, __pyx_int_2); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 838, __pyx_L1_error)
28208  __Pyx_GOTREF(__pyx_tuple__21);
28209  __Pyx_GIVEREF(__pyx_tuple__21);
28210 
28211  /* "ADR.pyx":839
28212  * self.updateLocal2Global()
28213  * log("Building time integration object",2)
28214  * log(memory("inflowBC, internalNodes,updateLocal2Global","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
28215  * #mwf for interpolating subgrid error for gradients etc
28216  * if self.stabilization and self.stabilization.usesGradientStabilization:
28217  */
28218  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_s_inflowBC_internalNodes_updateLoc, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 839, __pyx_L1_error)
28219  __Pyx_GOTREF(__pyx_tuple__22);
28220  __Pyx_GIVEREF(__pyx_tuple__22);
28221 
28222  /* "ADR.pyx":848
28223  * if options is not None:
28224  * self.timeIntegration.setFromOptions(options)
28225  * log(memory("TimeIntegration","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
28226  * log("Calculating numerical quadrature formulas",2)
28227  * self.calculateQuadrature()
28228  */
28229  __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_TimeIntegration, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 848, __pyx_L1_error)
28230  __Pyx_GOTREF(__pyx_tuple__23);
28231  __Pyx_GIVEREF(__pyx_tuple__23);
28232 
28233  /* "ADR.pyx":849
28234  * self.timeIntegration.setFromOptions(options)
28235  * log(memory("TimeIntegration","OneLevelTransport"),level=4)
28236  * log("Calculating numerical quadrature formulas",2) # <<<<<<<<<<<<<<
28237  * self.calculateQuadrature()
28238  *
28239  */
28240  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_kp_s_Calculating_numerical_quadrature, __pyx_int_2); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 849, __pyx_L1_error)
28241  __Pyx_GOTREF(__pyx_tuple__24);
28242  __Pyx_GIVEREF(__pyx_tuple__24);
28243 
28244  /* "ADR.pyx":859
28245  * self.setupFieldStrides()
28246  *
28247  * log(memory("stride+offset","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
28248  * if numericalFluxType is not None:
28249  * if options is None or options.periodicDirichletConditions is None:
28250  */
28251  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_kp_s_stride_offset, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 859, __pyx_L1_error)
28252  __Pyx_GOTREF(__pyx_tuple__25);
28253  __Pyx_GIVEREF(__pyx_tuple__25);
28254 
28255  /* "ADR.pyx":887
28256  * for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary):
28257  * self.ebqe['penalty'][ebNE,k] = self.numericalFlux.penalty_constant/self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power
28258  * log(memory("numericalFlux","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
28259  * self.elementEffectiveDiametersArray = self.mesh.elementInnerDiametersArray
28260  * #use post processing tools to get conservative fluxes, None by default
28261  */
28262  __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_numericalFlux, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 887, __pyx_L1_error)
28263  __Pyx_GOTREF(__pyx_tuple__26);
28264  __Pyx_GIVEREF(__pyx_tuple__26);
28265 
28266  /* "ADR.pyx":892
28267  * from proteus import PostProcessingTools
28268  * self.velocityPostProcessor = PostProcessingTools.VelocityPostProcessingChooser(self)
28269  * log(memory("velocity postprocessor","OneLevelTransport"),level=4) # <<<<<<<<<<<<<<
28270  * #helper for writing out data storage
28271  * from proteus import Archiver
28272  */
28273  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_kp_s_velocity_postprocessor, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 892, __pyx_L1_error)
28274  __Pyx_GOTREF(__pyx_tuple__27);
28275  __Pyx_GIVEREF(__pyx_tuple__27);
28276 
28277  /* "ADR.pyx":1004
28278  * self.ebqe['penalty'],
28279  * self.numericalFlux.boundaryAdjoint_sigma)
28280  * log("Global residual",level=9,data=r) # <<<<<<<<<<<<<<
28281  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
28282  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
28283  */
28284  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Global_residual); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 1004, __pyx_L1_error)
28285  __Pyx_GOTREF(__pyx_tuple__28);
28286  __Pyx_GIVEREF(__pyx_tuple__28);
28287 
28288  /* "ADR.pyx":1006
28289  * log("Global residual",level=9,data=r)
28290  * self.coefficients.massConservationError = fabs(globalSum(sum(r.flat[:self.mesh.nElements_owned])))
28291  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError) # <<<<<<<<<<<<<<
28292  * self.nonlinear_function_evaluations += 1
28293  * def getJacobian(self,jacobian):
28294  */
28295  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_Mass_Conservation_Error); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 1006, __pyx_L1_error)
28296  __Pyx_GOTREF(__pyx_tuple__29);
28297  __Pyx_GIVEREF(__pyx_tuple__29);
28298 
28299  /* "ADR.pyx":1069
28300  * self.ebqe['penalty'],
28301  * self.numericalFlux.boundaryAdjoint_sigma)
28302  * log("Jacobian ",level=10,data=jacobian) # <<<<<<<<<<<<<<
28303  * #mwf decide if this is reasonable for solver statistics
28304  * self.nonlinear_function_jacobian_evaluations += 1
28305  */
28306  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Jacobian); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 1069, __pyx_L1_error)
28307  __Pyx_GOTREF(__pyx_tuple__30);
28308  __Pyx_GIVEREF(__pyx_tuple__30);
28309 
28310  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
28311  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
28312  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
28313  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
28314  *
28315  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
28316  */
28317  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(2, 272, __pyx_L1_error)
28318  __Pyx_GOTREF(__pyx_tuple__31);
28319  __Pyx_GIVEREF(__pyx_tuple__31);
28320 
28321  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
28322  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
28323  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
28324  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
28325  *
28326  * info.buf = PyArray_DATA(self)
28327  */
28328  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 276, __pyx_L1_error)
28329  __Pyx_GOTREF(__pyx_tuple__32);
28330  __Pyx_GIVEREF(__pyx_tuple__32);
28331 
28332  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
28333  * if ((descr.byteorder == c'>' and little_endian) or
28334  * (descr.byteorder == c'<' and not little_endian)):
28335  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
28336  * if t == NPY_BYTE: f = "b"
28337  * elif t == NPY_UBYTE: f = "B"
28338  */
28339  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 306, __pyx_L1_error)
28340  __Pyx_GOTREF(__pyx_tuple__33);
28341  __Pyx_GIVEREF(__pyx_tuple__33);
28342 
28343  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
28344  *
28345  * if (end - f) - <int>(new_offset - offset[0]) < 15:
28346  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
28347  *
28348  * if ((child.byteorder == c'>' and little_endian) or
28349  */
28350  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 856, __pyx_L1_error)
28351  __Pyx_GOTREF(__pyx_tuple__34);
28352  __Pyx_GIVEREF(__pyx_tuple__34);
28353 
28354  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
28355  * t = child.type_num
28356  * if end - f < 5:
28357  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
28358  *
28359  * # Until ticket #99 is fixed, use integers to avoid warnings
28360  */
28361  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 880, __pyx_L1_error)
28362  __Pyx_GOTREF(__pyx_tuple__35);
28363  __Pyx_GIVEREF(__pyx_tuple__35);
28364 
28365  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
28366  * _import_array()
28367  * except Exception:
28368  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
28369  *
28370  * cdef inline int import_umath() except -1:
28371  */
28372  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 1038, __pyx_L1_error)
28373  __Pyx_GOTREF(__pyx_tuple__36);
28374  __Pyx_GIVEREF(__pyx_tuple__36);
28375 
28376  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
28377  * _import_umath()
28378  * except Exception:
28379  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
28380  *
28381  * cdef inline int import_ufunc() except -1:
28382  */
28383  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(2, 1044, __pyx_L1_error)
28384  __Pyx_GOTREF(__pyx_tuple__37);
28385  __Pyx_GIVEREF(__pyx_tuple__37);
28386 
28387  /* "ADR.pyx":394
28388  * """
28389  *
28390  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
28391  * SGE_base.__init__(self,coefficients,nd,lag=False)
28392  * def initializeElementQuadrature(self,mesh,t,cq):
28393  */
28394  __pyx_tuple__38 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_coefficients, __pyx_n_s_nd); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 394, __pyx_L1_error)
28395  __Pyx_GOTREF(__pyx_tuple__38);
28396  __Pyx_GIVEREF(__pyx_tuple__38);
28397  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_init, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(1, 394, __pyx_L1_error)
28398 
28399  /* "ADR.pyx":396
28400  * def __init__(self,coefficients,nd):
28401  * SGE_base.__init__(self,coefficients,nd,lag=False)
28402  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
28403  * pass
28404  * def updateSubgridErrorHistory(self,initializationPhase=False):
28405  */
28406  __pyx_tuple__40 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_mesh, __pyx_n_s_t, __pyx_n_s_cq); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 396, __pyx_L1_error)
28407  __Pyx_GOTREF(__pyx_tuple__40);
28408  __Pyx_GIVEREF(__pyx_tuple__40);
28409  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_initializeElementQuadrature, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(1, 396, __pyx_L1_error)
28410 
28411  /* "ADR.pyx":398
28412  * def initializeElementQuadrature(self,mesh,t,cq):
28413  * pass
28414  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
28415  * pass
28416  * def calculateSubgridError(self,q):
28417  */
28418  __pyx_tuple__42 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_initializationPhase); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 398, __pyx_L1_error)
28419  __Pyx_GOTREF(__pyx_tuple__42);
28420  __Pyx_GIVEREF(__pyx_tuple__42);
28421  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_updateSubgridErrorHistory, 398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 398, __pyx_L1_error)
28422  __pyx_tuple__44 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 398, __pyx_L1_error)
28423  __Pyx_GOTREF(__pyx_tuple__44);
28424  __Pyx_GIVEREF(__pyx_tuple__44);
28425 
28426  /* "ADR.pyx":400
28427  * def updateSubgridErrorHistory(self,initializationPhase=False):
28428  * pass
28429  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
28430  * pass
28431  *
28432  */
28433  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_q); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 400, __pyx_L1_error)
28434  __Pyx_GOTREF(__pyx_tuple__45);
28435  __Pyx_GIVEREF(__pyx_tuple__45);
28436  __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_calculateSubgridError, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(1, 400, __pyx_L1_error)
28437 
28438  /* "ADR.pyx":410
28439  * :parts: 2
28440  * """
28441  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
28442  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
28443  * self.nStepsToDelay = nStepsToDelay
28444  */
28445  __pyx_tuple__47 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_coefficients, __pyx_n_s_nd, __pyx_n_s_shockCapturingFactor, __pyx_n_s_lag, __pyx_n_s_nStepsToDelay); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 410, __pyx_L1_error)
28446  __Pyx_GOTREF(__pyx_tuple__47);
28447  __Pyx_GIVEREF(__pyx_tuple__47);
28448  __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_init, 410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(1, 410, __pyx_L1_error)
28449  __pyx_tuple__49 = PyTuple_Pack(3, ((PyObject*)__pyx_float_0_25), ((PyObject *)Py_True), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 410, __pyx_L1_error)
28450  __Pyx_GOTREF(__pyx_tuple__49);
28451  __Pyx_GIVEREF(__pyx_tuple__49);
28452 
28453  /* "ADR.pyx":418
28454  * self.nStepsToDelay=1
28455  * self.lag=False
28456  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
28457  * self.mesh=mesh
28458  * self.numDiff=[]
28459  */
28460  __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_mesh, __pyx_n_s_t, __pyx_n_s_cq, __pyx_n_s_ci); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 418, __pyx_L1_error)
28461  __Pyx_GOTREF(__pyx_tuple__50);
28462  __Pyx_GIVEREF(__pyx_tuple__50);
28463  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_initializeElementQuadrature, 418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 418, __pyx_L1_error)
28464 
28465  /* "ADR.pyx":425
28466  * self.numDiff.append(cq[('numDiff',ci,ci)])
28467  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
28468  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
28469  * self.nSteps += 1
28470  * if self.lag:
28471  */
28472  __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ci); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 425, __pyx_L1_error)
28473  __Pyx_GOTREF(__pyx_tuple__52);
28474  __Pyx_GIVEREF(__pyx_tuple__52);
28475  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_updateShockCapturingHistory, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 425, __pyx_L1_error)
28476 
28477  /* "ADR.pyx":439
28478  *
28479  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
28480  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
28481  * getAdvectiveFluxBoundaryConditions,
28482  * getDiffusiveFluxBoundaryConditions):
28483  */
28484  __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 439, __pyx_L1_error)
28485  __Pyx_GOTREF(__pyx_tuple__54);
28486  __Pyx_GIVEREF(__pyx_tuple__54);
28487  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_init, 439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(1, 439, __pyx_L1_error)
28488 
28489  /* "ADR.pyx":447
28490  *
28491  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
28492  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
28493  * getAdvectiveFluxBoundaryConditions,
28494  * getDiffusiveFluxBoundaryConditions):
28495  */
28496  __pyx_tuple__56 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 447, __pyx_L1_error)
28497  __Pyx_GOTREF(__pyx_tuple__56);
28498  __Pyx_GIVEREF(__pyx_tuple__56);
28499  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_init, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(1, 447, __pyx_L1_error)
28500 
28501  /* "ADR.pyx":455
28502  *
28503  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
28504  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
28505  * getAdvectiveFluxBoundaryConditions,
28506  * getDiffusiveFluxBoundaryConditions):
28507  */
28508  __pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_vt, __pyx_n_s_getPointwiseBoundaryConditions, __pyx_n_s_getAdvectiveFluxBoundaryConditio, __pyx_n_s_getDiffusiveFluxBoundaryConditio); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 455, __pyx_L1_error)
28509  __Pyx_GOTREF(__pyx_tuple__58);
28510  __Pyx_GIVEREF(__pyx_tuple__58);
28511  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_init, 455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(1, 455, __pyx_L1_error)
28512 
28513  /* "ADR.pyx":472
28514  * """
28515  * from proteus.ctransportCoefficients import L2projectEvaluate
28516  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
28517  * timeVaryingCoefficients=False,
28518  * forceStrongDirichlet=False,
28519  */
28520  __pyx_tuple__60 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_aOfX, __pyx_n_s_fOfX, __pyx_n_s_velocity, __pyx_n_s_nc, __pyx_n_s_nd, __pyx_n_s_l2proj, __pyx_n_s_timeVaryingCoefficients, __pyx_n_s_forceStrongDirichlet, __pyx_n_s_useMetrics, __pyx_n_s_sc_uref, __pyx_n_s_sc_beta, __pyx_n_s_mass, __pyx_n_s_advection, __pyx_n_s_diffusion, __pyx_n_s_potential, __pyx_n_s_reaction, __pyx_n_s_hamiltonian, __pyx_n_s_i, __pyx_n_s_sdInfo, __pyx_n_s_row); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 472, __pyx_L1_error)
28521  __Pyx_GOTREF(__pyx_tuple__60);
28522  __Pyx_GIVEREF(__pyx_tuple__60);
28523  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(12, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_init, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(1, 472, __pyx_L1_error)
28524  __pyx_tuple__62 = PyTuple_Pack(9, ((PyObject *)Py_None), ((PyObject *)__pyx_int_1), ((PyObject *)__pyx_int_2), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject*)__pyx_float_0_0), ((PyObject*)__pyx_float_1_0), ((PyObject*)__pyx_float_1_0)); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 472, __pyx_L1_error)
28525  __Pyx_GOTREF(__pyx_tuple__62);
28526  __Pyx_GIVEREF(__pyx_tuple__62);
28527 
28528  /* "ADR.pyx":514
28529  * useSparseDiffusion=True,
28530  * movingDomain=False)
28531  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
28532  * nd = self.nd
28533  * for ci in range(self.nc):
28534  */
28535  __pyx_tuple__63 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cq, __pyx_n_s_nd, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 514, __pyx_L1_error)
28536  __Pyx_GOTREF(__pyx_tuple__63);
28537  __Pyx_GIVEREF(__pyx_tuple__63);
28538  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_initializeElementQuadrature, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(1, 514, __pyx_L1_error)
28539 
28540  /* "ADR.pyx":525
28541  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
28542  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
28543  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
28544  * nd = self.nd
28545  * for c in [cebq,cebq_global]:
28546  */
28547  __pyx_tuple__65 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cebq, __pyx_n_s_cebq_global, __pyx_n_s_nd, __pyx_n_s_c, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 525, __pyx_L1_error)
28548  __Pyx_GOTREF(__pyx_tuple__65);
28549  __Pyx_GIVEREF(__pyx_tuple__65);
28550  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_initializeElementBoundaryQuadrat, 525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(1, 525, __pyx_L1_error)
28551 
28552  /* "ADR.pyx":538
28553  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
28554  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
28555  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
28556  * nd = self.nd
28557  * for c in [cebqe]:
28558  */
28559  __pyx_tuple__67 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_cebqe, __pyx_n_s_nd, __pyx_n_s_c, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 538, __pyx_L1_error)
28560  __Pyx_GOTREF(__pyx_tuple__67);
28561  __Pyx_GIVEREF(__pyx_tuple__67);
28562  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_initializeGlobalExteriorElementB, 538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(1, 538, __pyx_L1_error)
28563 
28564  /* "ADR.pyx":551
28565  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
28566  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
28567  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
28568  * if self.timeVaryingCoefficients:
28569  * nd = self.nd
28570  */
28571  __pyx_tuple__69 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_c, __pyx_n_s_nd, __pyx_n_s_ci, __pyx_n_s_i); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 551, __pyx_L1_error)
28572  __Pyx_GOTREF(__pyx_tuple__69);
28573  __Pyx_GIVEREF(__pyx_tuple__69);
28574  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_evaluate, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(1, 551, __pyx_L1_error)
28575 
28576  /* "ADR.pyx":571
28577  * """
28578  * nCalls=0
28579  * def __init__(self, # <<<<<<<<<<<<<<
28580  * uDict,
28581  * phiDict,
28582  */
28583  __pyx_tuple__71 = PyTuple_Pack(56, __pyx_n_s_self, __pyx_n_s_uDict, __pyx_n_s_phiDict, __pyx_n_s_testSpaceDict, __pyx_n_s_matType, __pyx_n_s_dofBoundaryConditionsDict, __pyx_n_s_dofBoundaryConditionsSetterDict, __pyx_n_s_coefficients, __pyx_n_s_elementQuadrature, __pyx_n_s_elementBoundaryQuadrature, __pyx_n_s_fluxBoundaryConditionsDict, __pyx_n_s_advectiveFluxBoundaryConditionsS, __pyx_n_s_diffusiveFluxBoundaryConditionsS, __pyx_n_s_stressTraceBoundaryConditionsSet, __pyx_n_s_stabilization, __pyx_n_s_shockCapturing, __pyx_n_s_conservativeFluxDict, __pyx_n_s_numericalFluxType, __pyx_n_s_TimeIntegrationClass, __pyx_n_s_massLumping, __pyx_n_s_reactionLumping, __pyx_n_s_options, __pyx_n_s_name, __pyx_n_s_reuse_trial_and_test_quadrature, __pyx_n_s_sd, __pyx_n_s_movingDomain, __pyx_n_s_Comm, __pyx_n_s_ci, __pyx_n_s_flag, __pyx_n_s_diffusionDict, __pyx_n_s_elementQuadratureDict, __pyx_n_s_elemQuadIsDict, __pyx_n_s_I, __pyx_n_s_elementBoundaryQuadratureDict, __pyx_n_s_cj, __pyx_n_s_ebNE, __pyx_n_s_ebN, __pyx_n_s_eN_global, __pyx_n_s_ebN_element, __pyx_n_s_i, __pyx_n_s_nI, __pyx_n_s_n, __pyx_n_s_comm, __pyx_n_s_k, __pyx_n_s_PostProcessingTools, __pyx_n_s_Archiver, __pyx_n_s_fbcObject, __pyx_n_s_t, __pyx_n_s_g, __pyx_n_s_ck, __pyx_n_s_diffusiveFluxBoundaryConditionsD_2, __pyx_n_s_compKernelFlag, __pyx_n_s_u_j, __pyx_n_s_phi_k, __pyx_n_s_femSpace, __pyx_n_s_dc); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 571, __pyx_L1_error)
28584  __Pyx_GOTREF(__pyx_tuple__71);
28585  __Pyx_GIVEREF(__pyx_tuple__71);
28586  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(26, 0, 56, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_init, 571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(1, 571, __pyx_L1_error)
28587  __pyx_tuple__73 = PyTuple_Pack(16, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject *)Py_None), ((PyObject*)__pyx_n_s_defaultName), ((PyObject *)Py_True), ((PyObject *)Py_True), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(1, 571, __pyx_L1_error)
28588  __Pyx_GOTREF(__pyx_tuple__73);
28589  __Pyx_GIVEREF(__pyx_tuple__73);
28590 
28591  /* "ADR.pyx":934
28592  * compKernelFlag)
28593  * #mwf these are getting called by redistancing classes,
28594  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
28595  * pass
28596  * def getResidual(self,u,r):
28597  */
28598  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(1, 934, __pyx_L1_error)
28599  __Pyx_GOTREF(__pyx_tuple__74);
28600  __Pyx_GIVEREF(__pyx_tuple__74);
28601  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_calculateCoefficients, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(1, 934, __pyx_L1_error)
28602 
28603  /* "ADR.pyx":936
28604  * def calculateCoefficients(self):
28605  * pass
28606  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
28607  * import pdb
28608  * import copy
28609  */
28610  __pyx_tuple__76 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_u, __pyx_n_s_r, __pyx_n_s_pdb, __pyx_n_s_copy); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(1, 936, __pyx_L1_error)
28611  __Pyx_GOTREF(__pyx_tuple__76);
28612  __Pyx_GIVEREF(__pyx_tuple__76);
28613  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_getResidual, 936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(1, 936, __pyx_L1_error)
28614 
28615  /* "ADR.pyx":1008
28616  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
28617  * self.nonlinear_function_evaluations += 1
28618  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
28619  * #import superluWrappers
28620  * #import numpy
28621  */
28622  __pyx_tuple__78 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_jacobian, __pyx_n_s_pdb); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 1008, __pyx_L1_error)
28623  __Pyx_GOTREF(__pyx_tuple__78);
28624  __Pyx_GIVEREF(__pyx_tuple__78);
28625  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_getJacobian, 1008, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(1, 1008, __pyx_L1_error)
28626 
28627  /* "ADR.pyx":1073
28628  * self.nonlinear_function_jacobian_evaluations += 1
28629  * return jacobian
28630  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
28631  * """
28632  * Calculate the physical location and weights of the quadrature rules
28633  */
28634  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(1, 1073, __pyx_L1_error)
28635  __Pyx_GOTREF(__pyx_tuple__80);
28636  __Pyx_GIVEREF(__pyx_tuple__80);
28637  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_calculateElementQuadrature, 1073, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(1, 1073, __pyx_L1_error)
28638 
28639  /* "ADR.pyx":1092
28640  * if self.shockCapturing is not None:
28641  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
28642  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
28643  * pass
28644  * def calculateExteriorElementBoundaryQuadrature(self):
28645  */
28646  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(1, 1092, __pyx_L1_error)
28647  __Pyx_GOTREF(__pyx_tuple__82);
28648  __Pyx_GIVEREF(__pyx_tuple__82);
28649  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_calculateElementBoundaryQuadratu, 1092, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(1, 1092, __pyx_L1_error)
28650 
28651  /* "ADR.pyx":1094
28652  * def calculateElementBoundaryQuadrature(self):
28653  * pass
28654  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
28655  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
28656  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
28657  */
28658  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_cj); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(1, 1094, __pyx_L1_error)
28659  __Pyx_GOTREF(__pyx_tuple__84);
28660  __Pyx_GIVEREF(__pyx_tuple__84);
28661  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_calculateExteriorElementBoundary, 1094, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(1, 1094, __pyx_L1_error)
28662 
28663  /* "ADR.pyx":1108
28664  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
28665  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
28666  * def estimate_mt(self): # <<<<<<<<<<<<<<
28667  * pass
28668  * def calculateAuxiliaryQuantitiesAfterStep(self):
28669  */
28670  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(1, 1108, __pyx_L1_error)
28671  __Pyx_GOTREF(__pyx_tuple__86);
28672  __Pyx_GIVEREF(__pyx_tuple__86);
28673  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_estimate_mt, 1108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(1, 1108, __pyx_L1_error)
28674 
28675  /* "ADR.pyx":1110
28676  * def estimate_mt(self):
28677  * pass
28678  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
28679  * pass
28680  * def calculateSolutionAtQuadrature(self):
28681  */
28682  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(1, 1110, __pyx_L1_error)
28683  __Pyx_GOTREF(__pyx_tuple__88);
28684  __Pyx_GIVEREF(__pyx_tuple__88);
28685  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_calculateAuxiliaryQuantitiesAfte, 1110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(1, 1110, __pyx_L1_error)
28686 
28687  /* "ADR.pyx":1112
28688  * def calculateAuxiliaryQuantitiesAfterStep(self):
28689  * pass
28690  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
28691  * pass
28692  */
28693  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 1112, __pyx_L1_error)
28694  __Pyx_GOTREF(__pyx_tuple__90);
28695  __Pyx_GIVEREF(__pyx_tuple__90);
28696  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_ADR_pyx, __pyx_n_s_calculateSolutionAtQuadrature, 1112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(1, 1112, __pyx_L1_error)
28697  __Pyx_RefNannyFinishContext();
28698  return 0;
28699  __pyx_L1_error:;
28700  __Pyx_RefNannyFinishContext();
28701  return -1;
28702 }
28703 
28704 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
28705  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
28706  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(1, 1, __pyx_L1_error)
28707  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(1, 1, __pyx_L1_error)
28708  __pyx_float_0_25 = PyFloat_FromDouble(0.25); if (unlikely(!__pyx_float_0_25)) __PYX_ERR(1, 1, __pyx_L1_error)
28709  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
28710  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
28711  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(1, 1, __pyx_L1_error)
28712  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(1, 1, __pyx_L1_error)
28713  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(1, 1, __pyx_L1_error)
28714  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(1, 1, __pyx_L1_error)
28715  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(1, 1, __pyx_L1_error)
28716  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(1, 1, __pyx_L1_error)
28717  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(1, 1, __pyx_L1_error)
28718  return 0;
28719  __pyx_L1_error:;
28720  return -1;
28721 }
28722 
28723 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
28724 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
28725 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
28726 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
28727 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
28728 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
28729 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
28730 
28731 static int __Pyx_modinit_global_init_code(void) {
28732  __Pyx_RefNannyDeclarations
28733  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
28734  /*--- Global init code ---*/
28735  __Pyx_RefNannyFinishContext();
28736  return 0;
28737 }
28738 
28739 static int __Pyx_modinit_variable_export_code(void) {
28740  __Pyx_RefNannyDeclarations
28741  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
28742  /*--- Variable export code ---*/
28743  __Pyx_RefNannyFinishContext();
28744  return 0;
28745 }
28746 
28747 static int __Pyx_modinit_function_export_code(void) {
28748  __Pyx_RefNannyDeclarations
28749  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
28750  /*--- Function export code ---*/
28751  __Pyx_RefNannyFinishContext();
28752  return 0;
28753 }
28754 
28755 static int __Pyx_modinit_type_init_code(void) {
28756  __Pyx_RefNannyDeclarations
28757  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
28758  /*--- Type init code ---*/
28759  if (PyType_Ready(&__pyx_type_3ADR_ADR) < 0) __PYX_ERR(1, 140, __pyx_L1_error)
28760  __pyx_type_3ADR_ADR.tp_print = 0;
28761  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3ADR_ADR.tp_dictoffset && __pyx_type_3ADR_ADR.tp_getattro == PyObject_GenericGetAttr)) {
28762  __pyx_type_3ADR_ADR.tp_getattro = __Pyx_PyObject_GenericGetAttr;
28763  }
28764  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ADR, (PyObject *)&__pyx_type_3ADR_ADR) < 0) __PYX_ERR(1, 140, __pyx_L1_error)
28765  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3ADR_ADR) < 0) __PYX_ERR(1, 140, __pyx_L1_error)
28766  __pyx_ptype_3ADR_ADR = &__pyx_type_3ADR_ADR;
28767  __Pyx_RefNannyFinishContext();
28768  return 0;
28769  __pyx_L1_error:;
28770  __Pyx_RefNannyFinishContext();
28771  return -1;
28772 }
28773 
28774 static int __Pyx_modinit_type_import_code(void) {
28775  __Pyx_RefNannyDeclarations
28776  PyObject *__pyx_t_1 = NULL;
28777  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
28778  /*--- Type import code ---*/
28779  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
28780  __Pyx_GOTREF(__pyx_t_1);
28781  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
28782  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
28783  sizeof(PyTypeObject),
28784  #else
28785  sizeof(PyHeapTypeObject),
28786  #endif
28787  __Pyx_ImportType_CheckSize_Warn);
28788  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
28789  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28790  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
28791  __Pyx_GOTREF(__pyx_t_1);
28792  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
28793  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error)
28794  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
28795  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error)
28796  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
28797  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error)
28798  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
28799  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error)
28800  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
28801  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error)
28802  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28803  __Pyx_RefNannyFinishContext();
28804  return 0;
28805  __pyx_L1_error:;
28806  __Pyx_XDECREF(__pyx_t_1);
28807  __Pyx_RefNannyFinishContext();
28808  return -1;
28809 }
28810 
28811 static int __Pyx_modinit_variable_import_code(void) {
28812  __Pyx_RefNannyDeclarations
28813  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
28814  /*--- Variable import code ---*/
28815  __Pyx_RefNannyFinishContext();
28816  return 0;
28817 }
28818 
28819 static int __Pyx_modinit_function_import_code(void) {
28820  __Pyx_RefNannyDeclarations
28821  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
28822  /*--- Function import code ---*/
28823  __Pyx_RefNannyFinishContext();
28824  return 0;
28825 }
28826 
28827 
28828 #if PY_MAJOR_VERSION < 3
28829 #ifdef CYTHON_NO_PYINIT_EXPORT
28830 #define __Pyx_PyMODINIT_FUNC void
28831 #else
28832 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
28833 #endif
28834 #else
28835 #ifdef CYTHON_NO_PYINIT_EXPORT
28836 #define __Pyx_PyMODINIT_FUNC PyObject *
28837 #else
28838 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
28839 #endif
28840 #endif
28841 
28842 
28843 #if PY_MAJOR_VERSION < 3
28844 __Pyx_PyMODINIT_FUNC initADR(void) CYTHON_SMALL_CODE; /*proto*/
28845 __Pyx_PyMODINIT_FUNC initADR(void)
28846 #else
28847 __Pyx_PyMODINIT_FUNC PyInit_ADR(void) CYTHON_SMALL_CODE; /*proto*/
28848 __Pyx_PyMODINIT_FUNC PyInit_ADR(void)
28849 #if CYTHON_PEP489_MULTI_PHASE_INIT
28850 {
28851  return PyModuleDef_Init(&__pyx_moduledef);
28852 }
28853 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
28854  #if PY_VERSION_HEX >= 0x030700A1
28855  static PY_INT64_T main_interpreter_id = -1;
28856  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
28857  if (main_interpreter_id == -1) {
28858  main_interpreter_id = current_id;
28859  return (unlikely(current_id == -1)) ? -1 : 0;
28860  } else if (unlikely(main_interpreter_id != current_id))
28861  #else
28862  static PyInterpreterState *main_interpreter = NULL;
28863  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
28864  if (!main_interpreter) {
28865  main_interpreter = current_interpreter;
28866  } else if (unlikely(main_interpreter != current_interpreter))
28867  #endif
28868  {
28869  PyErr_SetString(
28870  PyExc_ImportError,
28871  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
28872  return -1;
28873  }
28874  return 0;
28875 }
28876 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
28877  PyObject *value = PyObject_GetAttrString(spec, from_name);
28878  int result = 0;
28879  if (likely(value)) {
28880  if (allow_none || value != Py_None) {
28881  result = PyDict_SetItemString(moddict, to_name, value);
28882  }
28883  Py_DECREF(value);
28884  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
28885  PyErr_Clear();
28886  } else {
28887  result = -1;
28888  }
28889  return result;
28890 }
28891 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
28892  PyObject *module = NULL, *moddict, *modname;
28893  if (__Pyx_check_single_interpreter())
28894  return NULL;
28895  if (__pyx_m)
28896  return __Pyx_NewRef(__pyx_m);
28897  modname = PyObject_GetAttrString(spec, "name");
28898  if (unlikely(!modname)) goto bad;
28899  module = PyModule_NewObject(modname);
28900  Py_DECREF(modname);
28901  if (unlikely(!module)) goto bad;
28902  moddict = PyModule_GetDict(module);
28903  if (unlikely(!moddict)) goto bad;
28904  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
28905  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
28906  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
28907  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
28908  return module;
28909 bad:
28910  Py_XDECREF(module);
28911  return NULL;
28912 }
28913 
28914 
28915 static CYTHON_SMALL_CODE int __pyx_pymod_exec_ADR(PyObject *__pyx_pyinit_module)
28916 #endif
28917 #endif
28918 {
28919  PyObject *__pyx_t_1 = NULL;
28920  PyObject *__pyx_t_2 = NULL;
28921  PyObject *__pyx_t_3 = NULL;
28922  PyObject *__pyx_t_4 = NULL;
28923  PyObject *__pyx_t_5 = NULL;
28924  __Pyx_RefNannyDeclarations
28925  #if CYTHON_PEP489_MULTI_PHASE_INIT
28926  if (__pyx_m) {
28927  if (__pyx_m == __pyx_pyinit_module) return 0;
28928  PyErr_SetString(PyExc_RuntimeError, "Module 'ADR' has already been imported. Re-initialisation is not supported.");
28929  return -1;
28930  }
28931  #elif PY_MAJOR_VERSION >= 3
28932  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
28933  #endif
28934  #if CYTHON_REFNANNY
28935 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
28936 if (!__Pyx_RefNanny) {
28937  PyErr_Clear();
28938  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
28939  if (!__Pyx_RefNanny)
28940  Py_FatalError("failed to import 'refnanny' module");
28941 }
28942 #endif
28943  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ADR(void)", 0);
28944  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28945  #ifdef __Pxy_PyFrame_Initialize_Offsets
28946  __Pxy_PyFrame_Initialize_Offsets();
28947  #endif
28948  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
28949  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
28950  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
28951  #ifdef __Pyx_CyFunction_USED
28952  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28953  #endif
28954  #ifdef __Pyx_FusedFunction_USED
28955  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28956  #endif
28957  #ifdef __Pyx_Coroutine_USED
28958  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28959  #endif
28960  #ifdef __Pyx_Generator_USED
28961  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28962  #endif
28963  #ifdef __Pyx_AsyncGen_USED
28964  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28965  #endif
28966  #ifdef __Pyx_StopAsyncIteration_USED
28967  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28968  #endif
28969  /*--- Library function declarations ---*/
28970  /*--- Threads initialization code ---*/
28971  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
28972  #ifdef WITH_THREAD /* Python build with threading support? */
28973  PyEval_InitThreads();
28974  #endif
28975  #endif
28976  /*--- Module creation code ---*/
28977  #if CYTHON_PEP489_MULTI_PHASE_INIT
28978  __pyx_m = __pyx_pyinit_module;
28979  Py_INCREF(__pyx_m);
28980  #else
28981  #if PY_MAJOR_VERSION < 3
28982  __pyx_m = Py_InitModule4("ADR", __pyx_methods, __pyx_k_An_optimized_Advection_Diffusio, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
28983  #else
28984  __pyx_m = PyModule_Create(&__pyx_moduledef);
28985  #endif
28986  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
28987  #endif
28988  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
28989  Py_INCREF(__pyx_d);
28990  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
28991  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
28992  #if CYTHON_COMPILING_IN_PYPY
28993  Py_INCREF(__pyx_b);
28994  #endif
28995  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
28996  /*--- Initialize various global constants etc. ---*/
28997  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
28998  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
28999  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
29000  #endif
29001  if (__pyx_module_is_main_ADR) {
29002  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
29003  }
29004  #if PY_MAJOR_VERSION >= 3
29005  {
29006  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
29007  if (!PyDict_GetItemString(modules, "ADR")) {
29008  if (unlikely(PyDict_SetItemString(modules, "ADR", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
29009  }
29010  }
29011  #endif
29012  /*--- Builtin init code ---*/
29013  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
29014  /*--- Constants init code ---*/
29015  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
29016  /*--- Global type/function init code ---*/
29017  (void)__Pyx_modinit_global_init_code();
29018  (void)__Pyx_modinit_variable_export_code();
29019  (void)__Pyx_modinit_function_export_code();
29020  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
29021  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
29022  (void)__Pyx_modinit_variable_import_code();
29023  (void)__Pyx_modinit_function_import_code();
29024  /*--- Execution code ---*/
29025  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
29026  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
29027  #endif
29028 
29029  /* "ADR.pyx":6
29030  * """
29031  *
29032  * import numpy # <<<<<<<<<<<<<<
29033  * cimport numpy
29034  * from math import fabs
29035  */
29036  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
29037  __Pyx_GOTREF(__pyx_t_1);
29038  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(1, 6, __pyx_L1_error)
29039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29040 
29041  /* "ADR.pyx":8
29042  * import numpy
29043  * cimport numpy
29044  * from math import fabs # <<<<<<<<<<<<<<
29045  * import proteus
29046  * from proteus import cfemIntegrals, Quadrature
29047  */
29048  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
29049  __Pyx_GOTREF(__pyx_t_1);
29050  __Pyx_INCREF(__pyx_n_s_fabs);
29051  __Pyx_GIVEREF(__pyx_n_s_fabs);
29052  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_fabs);
29053  __pyx_t_2 = __Pyx_Import(__pyx_n_s_math, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
29054  __Pyx_GOTREF(__pyx_t_2);
29055  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29056  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_fabs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
29057  __Pyx_GOTREF(__pyx_t_1);
29058  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fabs, __pyx_t_1) < 0) __PYX_ERR(1, 8, __pyx_L1_error)
29059  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29060  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29061 
29062  /* "ADR.pyx":9
29063  * cimport numpy
29064  * from math import fabs
29065  * import proteus # <<<<<<<<<<<<<<
29066  * from proteus import cfemIntegrals, Quadrature
29067  * from proteus.NonlinearSolvers import NonlinearEquation
29068  */
29069  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
29070  __Pyx_GOTREF(__pyx_t_2);
29071  if (PyDict_SetItem(__pyx_d, __pyx_n_s_proteus, __pyx_t_2) < 0) __PYX_ERR(1, 9, __pyx_L1_error)
29072  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29073 
29074  /* "ADR.pyx":10
29075  * from math import fabs
29076  * import proteus
29077  * from proteus import cfemIntegrals, Quadrature # <<<<<<<<<<<<<<
29078  * from proteus.NonlinearSolvers import NonlinearEquation
29079  * from proteus.FemTools import (DOFBoundaryConditions,
29080  */
29081  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error)
29082  __Pyx_GOTREF(__pyx_t_2);
29083  __Pyx_INCREF(__pyx_n_s_cfemIntegrals);
29084  __Pyx_GIVEREF(__pyx_n_s_cfemIntegrals);
29085  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_cfemIntegrals);
29086  __Pyx_INCREF(__pyx_n_s_Quadrature);
29087  __Pyx_GIVEREF(__pyx_n_s_Quadrature);
29088  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Quadrature);
29089  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
29090  __Pyx_GOTREF(__pyx_t_1);
29091  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29092  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_cfemIntegrals); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error)
29093  __Pyx_GOTREF(__pyx_t_2);
29094  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cfemIntegrals, __pyx_t_2) < 0) __PYX_ERR(1, 10, __pyx_L1_error)
29095  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29096  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Quadrature); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error)
29097  __Pyx_GOTREF(__pyx_t_2);
29098  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Quadrature, __pyx_t_2) < 0) __PYX_ERR(1, 10, __pyx_L1_error)
29099  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29100  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29101 
29102  /* "ADR.pyx":11
29103  * import proteus
29104  * from proteus import cfemIntegrals, Quadrature
29105  * from proteus.NonlinearSolvers import NonlinearEquation # <<<<<<<<<<<<<<
29106  * from proteus.FemTools import (DOFBoundaryConditions,
29107  * FluxBoundaryConditions,
29108  */
29109  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
29110  __Pyx_GOTREF(__pyx_t_1);
29111  __Pyx_INCREF(__pyx_n_s_NonlinearEquation);
29112  __Pyx_GIVEREF(__pyx_n_s_NonlinearEquation);
29113  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_NonlinearEquation);
29114  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_NonlinearSolvers, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 11, __pyx_L1_error)
29115  __Pyx_GOTREF(__pyx_t_2);
29116  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29117  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NonlinearEquation); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
29118  __Pyx_GOTREF(__pyx_t_1);
29119  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonlinearEquation, __pyx_t_1) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
29120  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29121  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29122 
29123  /* "ADR.pyx":12
29124  * from proteus import cfemIntegrals, Quadrature
29125  * from proteus.NonlinearSolvers import NonlinearEquation
29126  * from proteus.FemTools import (DOFBoundaryConditions, # <<<<<<<<<<<<<<
29127  * FluxBoundaryConditions,
29128  * C0_AffineLinearOnSimplexWithNodalBasis)
29129  */
29130  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 12, __pyx_L1_error)
29131  __Pyx_GOTREF(__pyx_t_2);
29132  __Pyx_INCREF(__pyx_n_s_DOFBoundaryConditions);
29133  __Pyx_GIVEREF(__pyx_n_s_DOFBoundaryConditions);
29134  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DOFBoundaryConditions);
29135  __Pyx_INCREF(__pyx_n_s_FluxBoundaryConditions);
29136  __Pyx_GIVEREF(__pyx_n_s_FluxBoundaryConditions);
29137  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_FluxBoundaryConditions);
29138  __Pyx_INCREF(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
29139  __Pyx_GIVEREF(__pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
29140  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda);
29141  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_FemTools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
29142  __Pyx_GOTREF(__pyx_t_1);
29143  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29144  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DOFBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 12, __pyx_L1_error)
29145  __Pyx_GOTREF(__pyx_t_2);
29146  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DOFBoundaryConditions, __pyx_t_2) < 0) __PYX_ERR(1, 12, __pyx_L1_error)
29147  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29148  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_FluxBoundaryConditions); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 12, __pyx_L1_error)
29149  __Pyx_GOTREF(__pyx_t_2);
29150  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FluxBoundaryConditions, __pyx_t_2) < 0) __PYX_ERR(1, 13, __pyx_L1_error)
29151  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29152  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 12, __pyx_L1_error)
29153  __Pyx_GOTREF(__pyx_t_2);
29154  if (PyDict_SetItem(__pyx_d, __pyx_n_s_C0_AffineLinearOnSimplexWithNoda, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
29155  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29156  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29157 
29158  /* "ADR.pyx":15
29159  * FluxBoundaryConditions,
29160  * C0_AffineLinearOnSimplexWithNodalBasis)
29161  * from proteus.Comm import globalMax, globalSum # <<<<<<<<<<<<<<
29162  * from proteus.Profiling import memory
29163  * from proteus.Profiling import logEvent as log
29164  */
29165  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
29166  __Pyx_GOTREF(__pyx_t_1);
29167  __Pyx_INCREF(__pyx_n_s_globalMax);
29168  __Pyx_GIVEREF(__pyx_n_s_globalMax);
29169  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_globalMax);
29170  __Pyx_INCREF(__pyx_n_s_globalSum);
29171  __Pyx_GIVEREF(__pyx_n_s_globalSum);
29172  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_globalSum);
29173  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_Comm, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
29174  __Pyx_GOTREF(__pyx_t_2);
29175  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29176  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_globalMax); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
29177  __Pyx_GOTREF(__pyx_t_1);
29178  if (PyDict_SetItem(__pyx_d, __pyx_n_s_globalMax, __pyx_t_1) < 0) __PYX_ERR(1, 15, __pyx_L1_error)
29179  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29180  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_globalSum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
29181  __Pyx_GOTREF(__pyx_t_1);
29182  if (PyDict_SetItem(__pyx_d, __pyx_n_s_globalSum, __pyx_t_1) < 0) __PYX_ERR(1, 15, __pyx_L1_error)
29183  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29184  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29185 
29186  /* "ADR.pyx":16
29187  * C0_AffineLinearOnSimplexWithNodalBasis)
29188  * from proteus.Comm import globalMax, globalSum
29189  * from proteus.Profiling import memory # <<<<<<<<<<<<<<
29190  * from proteus.Profiling import logEvent as log
29191  * from proteus.Transport import OneLevelTransport
29192  */
29193  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
29194  __Pyx_GOTREF(__pyx_t_2);
29195  __Pyx_INCREF(__pyx_n_s_memory);
29196  __Pyx_GIVEREF(__pyx_n_s_memory);
29197  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_memory);
29198  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_Profiling, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 16, __pyx_L1_error)
29199  __Pyx_GOTREF(__pyx_t_1);
29200  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29201  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_memory); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
29202  __Pyx_GOTREF(__pyx_t_2);
29203  if (PyDict_SetItem(__pyx_d, __pyx_n_s_memory, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
29204  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29205  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29206 
29207  /* "ADR.pyx":17
29208  * from proteus.Comm import globalMax, globalSum
29209  * from proteus.Profiling import memory
29210  * from proteus.Profiling import logEvent as log # <<<<<<<<<<<<<<
29211  * from proteus.Transport import OneLevelTransport
29212  * from proteus.TransportCoefficients import TC_base
29213  */
29214  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
29215  __Pyx_GOTREF(__pyx_t_1);
29216  __Pyx_INCREF(__pyx_n_s_logEvent);
29217  __Pyx_GIVEREF(__pyx_n_s_logEvent);
29218  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_logEvent);
29219  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_Profiling, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L1_error)
29220  __Pyx_GOTREF(__pyx_t_2);
29221  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29222  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
29223  __Pyx_GOTREF(__pyx_t_1);
29224  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_1) < 0) __PYX_ERR(1, 17, __pyx_L1_error)
29225  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29226  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29227 
29228  /* "ADR.pyx":18
29229  * from proteus.Profiling import memory
29230  * from proteus.Profiling import logEvent as log
29231  * from proteus.Transport import OneLevelTransport # <<<<<<<<<<<<<<
29232  * from proteus.TransportCoefficients import TC_base
29233  * from proteus.SubgridError import SGE_base
29234  */
29235  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 18, __pyx_L1_error)
29236  __Pyx_GOTREF(__pyx_t_2);
29237  __Pyx_INCREF(__pyx_n_s_OneLevelTransport);
29238  __Pyx_GIVEREF(__pyx_n_s_OneLevelTransport);
29239  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OneLevelTransport);
29240  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_Transport, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error)
29241  __Pyx_GOTREF(__pyx_t_1);
29242  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29243  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 18, __pyx_L1_error)
29244  __Pyx_GOTREF(__pyx_t_2);
29245  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OneLevelTransport, __pyx_t_2) < 0) __PYX_ERR(1, 18, __pyx_L1_error)
29246  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29247  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29248 
29249  /* "ADR.pyx":19
29250  * from proteus.Profiling import logEvent as log
29251  * from proteus.Transport import OneLevelTransport
29252  * from proteus.TransportCoefficients import TC_base # <<<<<<<<<<<<<<
29253  * from proteus.SubgridError import SGE_base
29254  * from proteus.ShockCapturing import ShockCapturing_base
29255  */
29256  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error)
29257  __Pyx_GOTREF(__pyx_t_1);
29258  __Pyx_INCREF(__pyx_n_s_TC_base);
29259  __Pyx_GIVEREF(__pyx_n_s_TC_base);
29260  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TC_base);
29261  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_TransportCoefficients, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 19, __pyx_L1_error)
29262  __Pyx_GOTREF(__pyx_t_2);
29263  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29264  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error)
29265  __Pyx_GOTREF(__pyx_t_1);
29266  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TC_base, __pyx_t_1) < 0) __PYX_ERR(1, 19, __pyx_L1_error)
29267  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29268  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29269 
29270  /* "ADR.pyx":20
29271  * from proteus.Transport import OneLevelTransport
29272  * from proteus.TransportCoefficients import TC_base
29273  * from proteus.SubgridError import SGE_base # <<<<<<<<<<<<<<
29274  * from proteus.ShockCapturing import ShockCapturing_base
29275  *
29276  */
29277  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 20, __pyx_L1_error)
29278  __Pyx_GOTREF(__pyx_t_2);
29279  __Pyx_INCREF(__pyx_n_s_SGE_base);
29280  __Pyx_GIVEREF(__pyx_n_s_SGE_base);
29281  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SGE_base);
29282  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_SubgridError, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 20, __pyx_L1_error)
29283  __Pyx_GOTREF(__pyx_t_1);
29284  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29285  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SGE_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 20, __pyx_L1_error)
29286  __Pyx_GOTREF(__pyx_t_2);
29287  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SGE_base, __pyx_t_2) < 0) __PYX_ERR(1, 20, __pyx_L1_error)
29288  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29289  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29290 
29291  /* "ADR.pyx":21
29292  * from proteus.TransportCoefficients import TC_base
29293  * from proteus.SubgridError import SGE_base
29294  * from proteus.ShockCapturing import ShockCapturing_base # <<<<<<<<<<<<<<
29295  *
29296  * cdef extern from "ADR.h" namespace "proteus":
29297  */
29298  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
29299  __Pyx_GOTREF(__pyx_t_1);
29300  __Pyx_INCREF(__pyx_n_s_ShockCapturing_base);
29301  __Pyx_GIVEREF(__pyx_n_s_ShockCapturing_base);
29302  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ShockCapturing_base);
29303  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_ShockCapturing, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 21, __pyx_L1_error)
29304  __Pyx_GOTREF(__pyx_t_2);
29305  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29306  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
29307  __Pyx_GOTREF(__pyx_t_1);
29308  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShockCapturing_base, __pyx_t_1) < 0) __PYX_ERR(1, 21, __pyx_L1_error)
29309  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29310  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29311 
29312  /* "ADR.pyx":386
29313  *
29314  *
29315  * class SubgridError(SGE_base): # <<<<<<<<<<<<<<
29316  * """
29317  * SubgridError approximation for ADR equations
29318  */
29319  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SGE_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 386, __pyx_L1_error)
29320  __Pyx_GOTREF(__pyx_t_2);
29321  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 386, __pyx_L1_error)
29322  __Pyx_GOTREF(__pyx_t_1);
29323  __Pyx_GIVEREF(__pyx_t_2);
29324  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
29325  __pyx_t_2 = 0;
29326  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 386, __pyx_L1_error)
29327  __Pyx_GOTREF(__pyx_t_2);
29328  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SubgridError, __pyx_n_s_SubgridError, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_SubgridError_approximation_for); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 386, __pyx_L1_error)
29329  __Pyx_GOTREF(__pyx_t_3);
29330 
29331  /* "ADR.pyx":394
29332  * """
29333  *
29334  * def __init__(self,coefficients,nd): # <<<<<<<<<<<<<<
29335  * SGE_base.__init__(self,coefficients,nd,lag=False)
29336  * def initializeElementQuadrature(self,mesh,t,cq):
29337  */
29338  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_1__init__, 0, __pyx_n_s_SubgridError___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 394, __pyx_L1_error)
29339  __Pyx_GOTREF(__pyx_t_4);
29340  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(1, 394, __pyx_L1_error)
29341  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29342 
29343  /* "ADR.pyx":396
29344  * def __init__(self,coefficients,nd):
29345  * SGE_base.__init__(self,coefficients,nd,lag=False)
29346  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
29347  * pass
29348  * def updateSubgridErrorHistory(self,initializationPhase=False):
29349  */
29350  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_3initializeElementQuadrature, 0, __pyx_n_s_SubgridError_initializeElementQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 396, __pyx_L1_error)
29351  __Pyx_GOTREF(__pyx_t_4);
29352  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_4) < 0) __PYX_ERR(1, 396, __pyx_L1_error)
29353  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29354 
29355  /* "ADR.pyx":398
29356  * def initializeElementQuadrature(self,mesh,t,cq):
29357  * pass
29358  * def updateSubgridErrorHistory(self,initializationPhase=False): # <<<<<<<<<<<<<<
29359  * pass
29360  * def calculateSubgridError(self,q):
29361  */
29362  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_5updateSubgridErrorHistory, 0, __pyx_n_s_SubgridError_updateSubgridErrorH, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 398, __pyx_L1_error)
29363  __Pyx_GOTREF(__pyx_t_4);
29364  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__44);
29365  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_updateSubgridErrorHistory, __pyx_t_4) < 0) __PYX_ERR(1, 398, __pyx_L1_error)
29366  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29367 
29368  /* "ADR.pyx":400
29369  * def updateSubgridErrorHistory(self,initializationPhase=False):
29370  * pass
29371  * def calculateSubgridError(self,q): # <<<<<<<<<<<<<<
29372  * pass
29373  *
29374  */
29375  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12SubgridError_7calculateSubgridError, 0, __pyx_n_s_SubgridError_calculateSubgridErr, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 400, __pyx_L1_error)
29376  __Pyx_GOTREF(__pyx_t_4);
29377  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_calculateSubgridError, __pyx_t_4) < 0) __PYX_ERR(1, 400, __pyx_L1_error)
29378  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29379 
29380  /* "ADR.pyx":386
29381  *
29382  *
29383  * class SubgridError(SGE_base): # <<<<<<<<<<<<<<
29384  * """
29385  * SubgridError approximation for ADR equations
29386  */
29387  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SubgridError, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 386, __pyx_L1_error)
29388  __Pyx_GOTREF(__pyx_t_4);
29389  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubgridError, __pyx_t_4) < 0) __PYX_ERR(1, 386, __pyx_L1_error)
29390  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29391  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29392  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29393  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29394 
29395  /* "ADR.pyx":403
29396  * pass
29397  *
29398  * class ShockCapturing(ShockCapturing_base): # <<<<<<<<<<<<<<
29399  * """
29400  * Residual-based shock capturing for ADR equations
29401  */
29402  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ShockCapturing_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 403, __pyx_L1_error)
29403  __Pyx_GOTREF(__pyx_t_1);
29404  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 403, __pyx_L1_error)
29405  __Pyx_GOTREF(__pyx_t_2);
29406  __Pyx_GIVEREF(__pyx_t_1);
29407  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
29408  __pyx_t_1 = 0;
29409  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 403, __pyx_L1_error)
29410  __Pyx_GOTREF(__pyx_t_1);
29411  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ShockCapturing, __pyx_n_s_ShockCapturing, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Residual_based_shock_capturing); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 403, __pyx_L1_error)
29412  __Pyx_GOTREF(__pyx_t_3);
29413 
29414  /* "ADR.pyx":410
29415  * :parts: 2
29416  * """
29417  * def __init__(self,coefficients,nd,shockCapturingFactor=0.25,lag=True,nStepsToDelay=None): # <<<<<<<<<<<<<<
29418  * ShockCapturing_base.__init__(self,coefficients,nd,shockCapturingFactor,lag)
29419  * self.nStepsToDelay = nStepsToDelay
29420  */
29421  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_1__init__, 0, __pyx_n_s_ShockCapturing___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 410, __pyx_L1_error)
29422  __Pyx_GOTREF(__pyx_t_4);
29423  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__49);
29424  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(1, 410, __pyx_L1_error)
29425  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29426 
29427  /* "ADR.pyx":418
29428  * self.nStepsToDelay=1
29429  * self.lag=False
29430  * def initializeElementQuadrature(self,mesh,t,cq): # <<<<<<<<<<<<<<
29431  * self.mesh=mesh
29432  * self.numDiff=[]
29433  */
29434  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_3initializeElementQuadrature, 0, __pyx_n_s_ShockCapturing_initializeElement, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 418, __pyx_L1_error)
29435  __Pyx_GOTREF(__pyx_t_4);
29436  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_4) < 0) __PYX_ERR(1, 418, __pyx_L1_error)
29437  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29438 
29439  /* "ADR.pyx":425
29440  * self.numDiff.append(cq[('numDiff',ci,ci)])
29441  * self.numDiff_last.append(cq[('numDiff',ci,ci)])
29442  * def updateShockCapturingHistory(self): # <<<<<<<<<<<<<<
29443  * self.nSteps += 1
29444  * if self.lag:
29445  */
29446  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_14ShockCapturing_5updateShockCapturingHistory, 0, __pyx_n_s_ShockCapturing_updateShockCaptur, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 425, __pyx_L1_error)
29447  __Pyx_GOTREF(__pyx_t_4);
29448  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_updateShockCapturingHistory, __pyx_t_4) < 0) __PYX_ERR(1, 425, __pyx_L1_error)
29449  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29450 
29451  /* "ADR.pyx":403
29452  * pass
29453  *
29454  * class ShockCapturing(ShockCapturing_base): # <<<<<<<<<<<<<<
29455  * """
29456  * Residual-based shock capturing for ADR equations
29457  */
29458  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ShockCapturing, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 403, __pyx_L1_error)
29459  __Pyx_GOTREF(__pyx_t_4);
29460  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShockCapturing, __pyx_t_4) < 0) __PYX_ERR(1, 403, __pyx_L1_error)
29461  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29462  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29463  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29464  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29465 
29466  /* "ADR.pyx":438
29467  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
29468  *
29469  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior): # <<<<<<<<<<<<<<
29470  * def __init__(self,vt,getPointwiseBoundaryConditions,
29471  * getAdvectiveFluxBoundaryConditions,
29472  */
29473  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 438, __pyx_L1_error)
29474  __Pyx_GOTREF(__pyx_t_2);
29475  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 438, __pyx_L1_error)
29476  __Pyx_GOTREF(__pyx_t_1);
29477  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29478  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Advection_DiagonalUpwind_Diffusi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 438, __pyx_L1_error)
29479  __Pyx_GOTREF(__pyx_t_2);
29480  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29481  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 438, __pyx_L1_error)
29482  __Pyx_GOTREF(__pyx_t_1);
29483  __Pyx_GIVEREF(__pyx_t_2);
29484  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
29485  __pyx_t_2 = 0;
29486  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 438, __pyx_L1_error)
29487  __Pyx_GOTREF(__pyx_t_2);
29488  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NumericalFlux_IIPG, __pyx_n_s_NumericalFlux_IIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 438, __pyx_L1_error)
29489  __Pyx_GOTREF(__pyx_t_3);
29490 
29491  /* "ADR.pyx":439
29492  *
29493  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior):
29494  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
29495  * getAdvectiveFluxBoundaryConditions,
29496  * getDiffusiveFluxBoundaryConditions):
29497  */
29498  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_IIPG_1__init__, 0, __pyx_n_s_NumericalFlux_IIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 439, __pyx_L1_error)
29499  __Pyx_GOTREF(__pyx_t_4);
29500  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(1, 439, __pyx_L1_error)
29501  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29502 
29503  /* "ADR.pyx":438
29504  * log("VOF: max numDiff %e" % (globalMax(self.numDiff_last[0].max()),))
29505  *
29506  * class NumericalFlux_IIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior): # <<<<<<<<<<<<<<
29507  * def __init__(self,vt,getPointwiseBoundaryConditions,
29508  * getAdvectiveFluxBoundaryConditions,
29509  */
29510  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NumericalFlux_IIPG, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 438, __pyx_L1_error)
29511  __Pyx_GOTREF(__pyx_t_4);
29512  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_IIPG, __pyx_t_4) < 0) __PYX_ERR(1, 438, __pyx_L1_error)
29513  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29514  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29515  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29516  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29517 
29518  /* "ADR.pyx":446
29519  * getDiffusiveFluxBoundaryConditions)
29520  *
29521  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior): # <<<<<<<<<<<<<<
29522  * def __init__(self,vt,getPointwiseBoundaryConditions,
29523  * getAdvectiveFluxBoundaryConditions,
29524  */
29525  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_proteus); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 446, __pyx_L1_error)
29526  __Pyx_GOTREF(__pyx_t_1);
29527  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 446, __pyx_L1_error)
29528  __Pyx_GOTREF(__pyx_t_2);
29529  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29530  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 446, __pyx_L1_error)
29531  __Pyx_GOTREF(__pyx_t_1);
29532  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29533  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 446, __pyx_L1_error)
29534  __Pyx_GOTREF(__pyx_t_2);
29535  __Pyx_GIVEREF(__pyx_t_1);
29536  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
29537  __pyx_t_1 = 0;
29538  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 446, __pyx_L1_error)
29539  __Pyx_GOTREF(__pyx_t_1);
29540  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NumericalFlux_SIPG, __pyx_n_s_NumericalFlux_SIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 446, __pyx_L1_error)
29541  __Pyx_GOTREF(__pyx_t_3);
29542 
29543  /* "ADR.pyx":447
29544  *
29545  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior):
29546  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
29547  * getAdvectiveFluxBoundaryConditions,
29548  * getDiffusiveFluxBoundaryConditions):
29549  */
29550  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_SIPG_1__init__, 0, __pyx_n_s_NumericalFlux_SIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 447, __pyx_L1_error)
29551  __Pyx_GOTREF(__pyx_t_4);
29552  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(1, 447, __pyx_L1_error)
29553  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29554 
29555  /* "ADR.pyx":446
29556  * getDiffusiveFluxBoundaryConditions)
29557  *
29558  * class NumericalFlux_SIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior): # <<<<<<<<<<<<<<
29559  * def __init__(self,vt,getPointwiseBoundaryConditions,
29560  * getAdvectiveFluxBoundaryConditions,
29561  */
29562  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NumericalFlux_SIPG, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 446, __pyx_L1_error)
29563  __Pyx_GOTREF(__pyx_t_4);
29564  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_SIPG, __pyx_t_4) < 0) __PYX_ERR(1, 446, __pyx_L1_error)
29565  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29566  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29567  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29568  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29569 
29570  /* "ADR.pyx":454
29571  * getDiffusiveFluxBoundaryConditions)
29572  *
29573  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior): # <<<<<<<<<<<<<<
29574  * def __init__(self,vt,getPointwiseBoundaryConditions,
29575  * getAdvectiveFluxBoundaryConditions,
29576  */
29577  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 454, __pyx_L1_error)
29578  __Pyx_GOTREF(__pyx_t_2);
29579  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_NumericalFlux); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 454, __pyx_L1_error)
29580  __Pyx_GOTREF(__pyx_t_1);
29581  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29582  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Advection_DiagonalUpwind_Diffusi_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 454, __pyx_L1_error)
29583  __Pyx_GOTREF(__pyx_t_2);
29584  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29585  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 454, __pyx_L1_error)
29586  __Pyx_GOTREF(__pyx_t_1);
29587  __Pyx_GIVEREF(__pyx_t_2);
29588  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
29589  __pyx_t_2 = 0;
29590  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 454, __pyx_L1_error)
29591  __Pyx_GOTREF(__pyx_t_2);
29592  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NumericalFlux_NIPG, __pyx_n_s_NumericalFlux_NIPG, (PyObject *) NULL, __pyx_n_s_ADR, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 454, __pyx_L1_error)
29593  __Pyx_GOTREF(__pyx_t_3);
29594 
29595  /* "ADR.pyx":455
29596  *
29597  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior):
29598  * def __init__(self,vt,getPointwiseBoundaryConditions, # <<<<<<<<<<<<<<
29599  * getAdvectiveFluxBoundaryConditions,
29600  * getDiffusiveFluxBoundaryConditions):
29601  */
29602  __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_18NumericalFlux_NIPG_1__init__, 0, __pyx_n_s_NumericalFlux_NIPG___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 455, __pyx_L1_error)
29603  __Pyx_GOTREF(__pyx_t_4);
29604  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(1, 455, __pyx_L1_error)
29605  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29606 
29607  /* "ADR.pyx":454
29608  * getDiffusiveFluxBoundaryConditions)
29609  *
29610  * class NumericalFlux_NIPG(proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior): # <<<<<<<<<<<<<<
29611  * def __init__(self,vt,getPointwiseBoundaryConditions,
29612  * getAdvectiveFluxBoundaryConditions,
29613  */
29614  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NumericalFlux_NIPG, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 454, __pyx_L1_error)
29615  __Pyx_GOTREF(__pyx_t_4);
29616  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux_NIPG, __pyx_t_4) < 0) __PYX_ERR(1, 454, __pyx_L1_error)
29617  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29618  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29619  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29620  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29621 
29622  /* "ADR.pyx":462
29623  * getDiffusiveFluxBoundaryConditions)
29624  *
29625  * NumericalFlux = NumericalFlux_SIPG # <<<<<<<<<<<<<<
29626  *
29627  * class Coefficients(TC_base):
29628  */
29629  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NumericalFlux_SIPG); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 462, __pyx_L1_error)
29630  __Pyx_GOTREF(__pyx_t_1);
29631  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericalFlux, __pyx_t_1) < 0) __PYX_ERR(1, 462, __pyx_L1_error)
29632  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29633 
29634  /* "ADR.pyx":464
29635  * NumericalFlux = NumericalFlux_SIPG
29636  *
29637  * class Coefficients(TC_base): # <<<<<<<<<<<<<<
29638  * """
29639  * Coefficients of linear ADR equations
29640  */
29641  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TC_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 464, __pyx_L1_error)
29642  __Pyx_GOTREF(__pyx_t_1);
29643  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 464, __pyx_L1_error)
29644  __Pyx_GOTREF(__pyx_t_2);
29645  __Pyx_GIVEREF(__pyx_t_1);
29646  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
29647  __pyx_t_1 = 0;
29648  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 464, __pyx_L1_error)
29649  __Pyx_GOTREF(__pyx_t_1);
29650  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Coefficients, __pyx_n_s_Coefficients, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Coefficients_of_linear_ADR_equa); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 464, __pyx_L1_error)
29651  __Pyx_GOTREF(__pyx_t_3);
29652 
29653  /* "ADR.pyx":471
29654  * :parts: 2
29655  * """
29656  * from proteus.ctransportCoefficients import L2projectEvaluate # <<<<<<<<<<<<<<
29657  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None,
29658  * timeVaryingCoefficients=False,
29659  */
29660  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 471, __pyx_L1_error)
29661  __Pyx_GOTREF(__pyx_t_4);
29662  __Pyx_INCREF(__pyx_n_s_L2projectEvaluate);
29663  __Pyx_GIVEREF(__pyx_n_s_L2projectEvaluate);
29664  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_L2projectEvaluate);
29665  __pyx_t_5 = __Pyx_Import(__pyx_n_s_proteus_ctransportCoefficients, __pyx_t_4, -1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 471, __pyx_L1_error)
29666  __Pyx_GOTREF(__pyx_t_5);
29667  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29668  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_L2projectEvaluate); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 471, __pyx_L1_error)
29669  __Pyx_GOTREF(__pyx_t_4);
29670  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_L2projectEvaluate, __pyx_t_4) < 0) __PYX_ERR(1, 471, __pyx_L1_error)
29671  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29672  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29673 
29674  /* "ADR.pyx":472
29675  * """
29676  * from proteus.ctransportCoefficients import L2projectEvaluate
29677  * def __init__(self,aOfX,fOfX,velocity=None,nc=1,nd=2,l2proj=None, # <<<<<<<<<<<<<<
29678  * timeVaryingCoefficients=False,
29679  * forceStrongDirichlet=False,
29680  */
29681  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_1__init__, 0, __pyx_n_s_Coefficients___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 472, __pyx_L1_error)
29682  __Pyx_GOTREF(__pyx_t_5);
29683  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__62);
29684  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(1, 472, __pyx_L1_error)
29685  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29686 
29687  /* "ADR.pyx":514
29688  * useSparseDiffusion=True,
29689  * movingDomain=False)
29690  * def initializeElementQuadrature(self,t,cq): # <<<<<<<<<<<<<<
29691  * nd = self.nd
29692  * for ci in range(self.nc):
29693  */
29694  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_3initializeElementQuadrature, 0, __pyx_n_s_Coefficients_initializeElementQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error)
29695  __Pyx_GOTREF(__pyx_t_5);
29696  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_initializeElementQuadrature, __pyx_t_5) < 0) __PYX_ERR(1, 514, __pyx_L1_error)
29697  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29698 
29699  /* "ADR.pyx":525
29700  * cq[('r',ci)].flat[i] = -self.fOfX[ci](cq['x'].flat[3*i:3*(i+1)])
29701  * cq[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](cq['x'].flat[3*i:3*(i+1)]).flat
29702  * def initializeElementBoundaryQuadrature(self,t,cebq,cebq_global): # <<<<<<<<<<<<<<
29703  * nd = self.nd
29704  * for c in [cebq,cebq_global]:
29705  */
29706  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_5initializeElementBoundaryQuadrature, 0, __pyx_n_s_Coefficients_initializeElementBo, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 525, __pyx_L1_error)
29707  __Pyx_GOTREF(__pyx_t_5);
29708  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_initializeElementBoundaryQuadrat, __pyx_t_5) < 0) __PYX_ERR(1, 525, __pyx_L1_error)
29709  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29710 
29711  /* "ADR.pyx":538
29712  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
29713  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
29714  * def initializeGlobalExteriorElementBoundaryQuadrature(self,t,cebqe): # <<<<<<<<<<<<<<
29715  * nd = self.nd
29716  * for c in [cebqe]:
29717  */
29718  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_7initializeGlobalExteriorElementBoundaryQuadrature, 0, __pyx_n_s_Coefficients_initializeGlobalExt, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 538, __pyx_L1_error)
29719  __Pyx_GOTREF(__pyx_t_5);
29720  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_initializeGlobalExteriorElementB, __pyx_t_5) < 0) __PYX_ERR(1, 538, __pyx_L1_error)
29721  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29722 
29723  /* "ADR.pyx":551
29724  * c[('r',ci)].flat[i] = -self.fOfX[ci](c['x'].flat[3*i:3*(i+1)])
29725  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
29726  * def evaluate(self,t,c): # <<<<<<<<<<<<<<
29727  * if self.timeVaryingCoefficients:
29728  * nd = self.nd
29729  */
29730  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_12Coefficients_9evaluate, 0, __pyx_n_s_Coefficients_evaluate, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 551, __pyx_L1_error)
29731  __Pyx_GOTREF(__pyx_t_5);
29732  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_evaluate, __pyx_t_5) < 0) __PYX_ERR(1, 551, __pyx_L1_error)
29733  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29734 
29735  /* "ADR.pyx":464
29736  * NumericalFlux = NumericalFlux_SIPG
29737  *
29738  * class Coefficients(TC_base): # <<<<<<<<<<<<<<
29739  * """
29740  * Coefficients of linear ADR equations
29741  */
29742  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Coefficients, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 464, __pyx_L1_error)
29743  __Pyx_GOTREF(__pyx_t_5);
29744  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Coefficients, __pyx_t_5) < 0) __PYX_ERR(1, 464, __pyx_L1_error)
29745  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29746  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29747  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29748  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29749 
29750  /* "ADR.pyx":563
29751  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
29752  *
29753  * class LevelModel(proteus.Transport.OneLevelTransport): # <<<<<<<<<<<<<<
29754  * """
29755  * Optimized LevelModel for ADR equations
29756  */
29757  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_proteus); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 563, __pyx_L1_error)
29758  __Pyx_GOTREF(__pyx_t_2);
29759  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Transport); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 563, __pyx_L1_error)
29760  __Pyx_GOTREF(__pyx_t_1);
29761  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29762  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OneLevelTransport); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 563, __pyx_L1_error)
29763  __Pyx_GOTREF(__pyx_t_2);
29764  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29765  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 563, __pyx_L1_error)
29766  __Pyx_GOTREF(__pyx_t_1);
29767  __Pyx_GIVEREF(__pyx_t_2);
29768  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
29769  __pyx_t_2 = 0;
29770  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 563, __pyx_L1_error)
29771  __Pyx_GOTREF(__pyx_t_2);
29772  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LevelModel, __pyx_n_s_LevelModel, (PyObject *) NULL, __pyx_n_s_ADR, __pyx_kp_s_Optimized_LevelModel_for_ADR_eq); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 563, __pyx_L1_error)
29773  __Pyx_GOTREF(__pyx_t_3);
29774 
29775  /* "ADR.pyx":570
29776  * :parts: 2
29777  * """
29778  * nCalls=0 # <<<<<<<<<<<<<<
29779  * def __init__(self,
29780  * uDict,
29781  */
29782  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_nCalls, __pyx_int_0) < 0) __PYX_ERR(1, 570, __pyx_L1_error)
29783 
29784  /* "ADR.pyx":571
29785  * """
29786  * nCalls=0
29787  * def __init__(self, # <<<<<<<<<<<<<<
29788  * uDict,
29789  * phiDict,
29790  */
29791  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_1__init__, 0, __pyx_n_s_LevelModel___init, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 571, __pyx_L1_error)
29792  __Pyx_GOTREF(__pyx_t_5);
29793  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__73);
29794  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(1, 571, __pyx_L1_error)
29795  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29796 
29797  /* "ADR.pyx":934
29798  * compKernelFlag)
29799  * #mwf these are getting called by redistancing classes,
29800  * def calculateCoefficients(self): # <<<<<<<<<<<<<<
29801  * pass
29802  * def getResidual(self,u,r):
29803  */
29804  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_3calculateCoefficients, 0, __pyx_n_s_LevelModel_calculateCoefficients, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 934, __pyx_L1_error)
29805  __Pyx_GOTREF(__pyx_t_5);
29806  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_calculateCoefficients, __pyx_t_5) < 0) __PYX_ERR(1, 934, __pyx_L1_error)
29807  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29808 
29809  /* "ADR.pyx":936
29810  * def calculateCoefficients(self):
29811  * pass
29812  * def getResidual(self,u,r): # <<<<<<<<<<<<<<
29813  * import pdb
29814  * import copy
29815  */
29816  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_5getResidual, 0, __pyx_n_s_LevelModel_getResidual, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 936, __pyx_L1_error)
29817  __Pyx_GOTREF(__pyx_t_5);
29818  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_getResidual, __pyx_t_5) < 0) __PYX_ERR(1, 936, __pyx_L1_error)
29819  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29820 
29821  /* "ADR.pyx":1008
29822  * log(" Mass Conservation Error",level=3,data=self.coefficients.massConservationError)
29823  * self.nonlinear_function_evaluations += 1
29824  * def getJacobian(self,jacobian): # <<<<<<<<<<<<<<
29825  * #import superluWrappers
29826  * #import numpy
29827  */
29828  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_7getJacobian, 0, __pyx_n_s_LevelModel_getJacobian, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1008, __pyx_L1_error)
29829  __Pyx_GOTREF(__pyx_t_5);
29830  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_getJacobian, __pyx_t_5) < 0) __PYX_ERR(1, 1008, __pyx_L1_error)
29831  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29832 
29833  /* "ADR.pyx":1073
29834  * self.nonlinear_function_jacobian_evaluations += 1
29835  * return jacobian
29836  * def calculateElementQuadrature(self): # <<<<<<<<<<<<<<
29837  * """
29838  * Calculate the physical location and weights of the quadrature rules
29839  */
29840  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_9calculateElementQuadrature, 0, __pyx_n_s_LevelModel_calculateElementQuadr, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1073, __pyx_L1_error)
29841  __Pyx_GOTREF(__pyx_t_5);
29842  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_calculateElementQuadrature, __pyx_t_5) < 0) __PYX_ERR(1, 1073, __pyx_L1_error)
29843  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29844 
29845  /* "ADR.pyx":1092
29846  * if self.shockCapturing is not None:
29847  * self.shockCapturing.initializeElementQuadrature(self.mesh,self.timeIntegration.t,self.q)
29848  * def calculateElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
29849  * pass
29850  * def calculateExteriorElementBoundaryQuadrature(self):
29851  */
29852  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_11calculateElementBoundaryQuadrature, 0, __pyx_n_s_LevelModel_calculateElementBound, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1092, __pyx_L1_error)
29853  __Pyx_GOTREF(__pyx_t_5);
29854  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_calculateElementBoundaryQuadratu, __pyx_t_5) < 0) __PYX_ERR(1, 1092, __pyx_L1_error)
29855  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29856 
29857  /* "ADR.pyx":1094
29858  * def calculateElementBoundaryQuadrature(self):
29859  * pass
29860  * def calculateExteriorElementBoundaryQuadrature(self): # <<<<<<<<<<<<<<
29861  * self.u[0].femSpace.elementMaps.getBasisValuesTraceRef(self.elementBoundaryQuadraturePoints)
29862  * self.u[0].femSpace.elementMaps.getBasisGradientValuesTraceRef(self.elementBoundaryQuadraturePoints)
29863  */
29864  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_13calculateExteriorElementBoundaryQuadrature, 0, __pyx_n_s_LevelModel_calculateExteriorElem, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1094, __pyx_L1_error)
29865  __Pyx_GOTREF(__pyx_t_5);
29866  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_calculateExteriorElementBoundary, __pyx_t_5) < 0) __PYX_ERR(1, 1094, __pyx_L1_error)
29867  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29868 
29869  /* "ADR.pyx":1108
29870  * for cj in self.advectiveFluxBoundaryConditionsSetterDict.keys()])
29871  * self.coefficients.initializeGlobalExteriorElementBoundaryQuadrature(self.timeIntegration.t,self.ebqe)
29872  * def estimate_mt(self): # <<<<<<<<<<<<<<
29873  * pass
29874  * def calculateAuxiliaryQuantitiesAfterStep(self):
29875  */
29876  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_15estimate_mt, 0, __pyx_n_s_LevelModel_estimate_mt, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1108, __pyx_L1_error)
29877  __Pyx_GOTREF(__pyx_t_5);
29878  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_estimate_mt, __pyx_t_5) < 0) __PYX_ERR(1, 1108, __pyx_L1_error)
29879  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29880 
29881  /* "ADR.pyx":1110
29882  * def estimate_mt(self):
29883  * pass
29884  * def calculateAuxiliaryQuantitiesAfterStep(self): # <<<<<<<<<<<<<<
29885  * pass
29886  * def calculateSolutionAtQuadrature(self):
29887  */
29888  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_17calculateAuxiliaryQuantitiesAfterStep, 0, __pyx_n_s_LevelModel_calculateAuxiliaryQua, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1110, __pyx_L1_error)
29889  __Pyx_GOTREF(__pyx_t_5);
29890  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_calculateAuxiliaryQuantitiesAfte, __pyx_t_5) < 0) __PYX_ERR(1, 1110, __pyx_L1_error)
29891  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29892 
29893  /* "ADR.pyx":1112
29894  * def calculateAuxiliaryQuantitiesAfterStep(self):
29895  * pass
29896  * def calculateSolutionAtQuadrature(self): # <<<<<<<<<<<<<<
29897  * pass
29898  */
29899  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3ADR_10LevelModel_19calculateSolutionAtQuadrature, 0, __pyx_n_s_LevelModel_calculateSolutionAtQu, NULL, __pyx_n_s_ADR, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1112, __pyx_L1_error)
29900  __Pyx_GOTREF(__pyx_t_5);
29901  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_calculateSolutionAtQuadrature, __pyx_t_5) < 0) __PYX_ERR(1, 1112, __pyx_L1_error)
29902  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29903 
29904  /* "ADR.pyx":563
29905  * c[('a',ci,ci)].flat[nd*nd*i:nd*nd*(i+1)] = self.aOfX[ci](c['x'].flat[3*i:3*(i+1)]).flat
29906  *
29907  * class LevelModel(proteus.Transport.OneLevelTransport): # <<<<<<<<<<<<<<
29908  * """
29909  * Optimized LevelModel for ADR equations
29910  */
29911  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LevelModel, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 563, __pyx_L1_error)
29912  __Pyx_GOTREF(__pyx_t_5);
29913  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LevelModel, __pyx_t_5) < 0) __PYX_ERR(1, 563, __pyx_L1_error)
29914  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29915  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29916  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29917  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29918 
29919  /* "ADR.pyx":1
29920  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
29921  * """
29922  * An optimized Advection-Diffusion-Reaction module
29923  */
29924  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
29925  __Pyx_GOTREF(__pyx_t_1);
29926  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
29927  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29928 
29929  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
29930  * raise ImportError("numpy.core.umath failed to import")
29931  *
29932  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
29933  * try:
29934  * _import_umath()
29935  */
29936 
29937  /*--- Wrapped vars code ---*/
29938 
29939  goto __pyx_L0;
29940  __pyx_L1_error:;
29941  __Pyx_XDECREF(__pyx_t_1);
29942  __Pyx_XDECREF(__pyx_t_2);
29943  __Pyx_XDECREF(__pyx_t_3);
29944  __Pyx_XDECREF(__pyx_t_4);
29945  __Pyx_XDECREF(__pyx_t_5);
29946  if (__pyx_m) {
29947  if (__pyx_d) {
29948  __Pyx_AddTraceback("init ADR", __pyx_clineno, __pyx_lineno, __pyx_filename);
29949  }
29950  Py_CLEAR(__pyx_m);
29951  } else if (!PyErr_Occurred()) {
29952  PyErr_SetString(PyExc_ImportError, "init ADR");
29953  }
29954  __pyx_L0:;
29955  __Pyx_RefNannyFinishContext();
29956  #if CYTHON_PEP489_MULTI_PHASE_INIT
29957  return (__pyx_m != NULL) ? 0 : -1;
29958  #elif PY_MAJOR_VERSION >= 3
29959  return __pyx_m;
29960  #else
29961  return;
29962  #endif
29963 }
29964 
29965 /* --- Runtime support code --- */
29966 /* Refnanny */
29967 #if CYTHON_REFNANNY
29968 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
29969  PyObject *m = NULL, *p = NULL;
29970  void *r = NULL;
29971  m = PyImport_ImportModule(modname);
29972  if (!m) goto end;
29973  p = PyObject_GetAttrString(m, "RefNannyAPI");
29974  if (!p) goto end;
29975  r = PyLong_AsVoidPtr(p);
29976 end:
29977  Py_XDECREF(p);
29978  Py_XDECREF(m);
29979  return (__Pyx_RefNannyAPIStruct *)r;
29980 }
29981 #endif
29982 
29983 /* PyObjectGetAttrStr */
29984 #if CYTHON_USE_TYPE_SLOTS
29985 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
29986  PyTypeObject* tp = Py_TYPE(obj);
29987  if (likely(tp->tp_getattro))
29988  return tp->tp_getattro(obj, attr_name);
29989 #if PY_MAJOR_VERSION < 3
29990  if (likely(tp->tp_getattr))
29991  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
29992 #endif
29993  return PyObject_GetAttr(obj, attr_name);
29994 }
29995 #endif
29996 
29997 /* GetBuiltinName */
29998 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
29999  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
30000  if (unlikely(!result)) {
30001  PyErr_Format(PyExc_NameError,
30002 #if PY_MAJOR_VERSION >= 3
30003  "name '%U' is not defined", name);
30004 #else
30005  "name '%.200s' is not defined", PyString_AS_STRING(name));
30006 #endif
30007  }
30008  return result;
30009 }
30010 
30011 /* RaiseArgTupleInvalid */
30012 static void __Pyx_RaiseArgtupleInvalid(
30013  const char* func_name,
30014  int exact,
30015  Py_ssize_t num_min,
30016  Py_ssize_t num_max,
30017  Py_ssize_t num_found)
30018 {
30019  Py_ssize_t num_expected;
30020  const char *more_or_less;
30021  if (num_found < num_min) {
30022  num_expected = num_min;
30023  more_or_less = "at least";
30024  } else {
30025  num_expected = num_max;
30026  more_or_less = "at most";
30027  }
30028  if (exact) {
30029  more_or_less = "exactly";
30030  }
30031  PyErr_Format(PyExc_TypeError,
30032  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
30033  func_name, more_or_less, num_expected,
30034  (num_expected == 1) ? "" : "s", num_found);
30035 }
30036 
30037 /* RaiseDoubleKeywords */
30038 static void __Pyx_RaiseDoubleKeywordsError(
30039  const char* func_name,
30040  PyObject* kw_name)
30041 {
30042  PyErr_Format(PyExc_TypeError,
30043  #if PY_MAJOR_VERSION >= 3
30044  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
30045  #else
30046  "%s() got multiple values for keyword argument '%s'", func_name,
30047  PyString_AsString(kw_name));
30048  #endif
30049 }
30050 
30051 /* ParseKeywords */
30052 static int __Pyx_ParseOptionalKeywords(
30053  PyObject *kwds,
30054  PyObject **argnames[],
30055  PyObject *kwds2,
30056  PyObject *values[],
30057  Py_ssize_t num_pos_args,
30058  const char* function_name)
30059 {
30060  PyObject *key = 0, *value = 0;
30061  Py_ssize_t pos = 0;
30062  PyObject*** name;
30063  PyObject*** first_kw_arg = argnames + num_pos_args;
30064  while (PyDict_Next(kwds, &pos, &key, &value)) {
30065  name = first_kw_arg;
30066  while (*name && (**name != key)) name++;
30067  if (*name) {
30068  values[name-argnames] = value;
30069  continue;
30070  }
30071  name = first_kw_arg;
30072  #if PY_MAJOR_VERSION < 3
30073  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
30074  while (*name) {
30075  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
30076  && _PyString_Eq(**name, key)) {
30077  values[name-argnames] = value;
30078  break;
30079  }
30080  name++;
30081  }
30082  if (*name) continue;
30083  else {
30084  PyObject*** argname = argnames;
30085  while (argname != first_kw_arg) {
30086  if ((**argname == key) || (
30087  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
30088  && _PyString_Eq(**argname, key))) {
30089  goto arg_passed_twice;
30090  }
30091  argname++;
30092  }
30093  }
30094  } else
30095  #endif
30096  if (likely(PyUnicode_Check(key))) {
30097  while (*name) {
30098  int cmp = (**name == key) ? 0 :
30099  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
30100  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
30101  #endif
30102  PyUnicode_Compare(**name, key);
30103  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
30104  if (cmp == 0) {
30105  values[name-argnames] = value;
30106  break;
30107  }
30108  name++;
30109  }
30110  if (*name) continue;
30111  else {
30112  PyObject*** argname = argnames;
30113  while (argname != first_kw_arg) {
30114  int cmp = (**argname == key) ? 0 :
30115  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
30116  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
30117  #endif
30118  PyUnicode_Compare(**argname, key);
30119  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
30120  if (cmp == 0) goto arg_passed_twice;
30121  argname++;
30122  }
30123  }
30124  } else
30125  goto invalid_keyword_type;
30126  if (kwds2) {
30127  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
30128  } else {
30129  goto invalid_keyword;
30130  }
30131  }
30132  return 0;
30133 arg_passed_twice:
30134  __Pyx_RaiseDoubleKeywordsError(function_name, key);
30135  goto bad;
30136 invalid_keyword_type:
30137  PyErr_Format(PyExc_TypeError,
30138  "%.200s() keywords must be strings", function_name);
30139  goto bad;
30140 invalid_keyword:
30141  PyErr_Format(PyExc_TypeError,
30142  #if PY_MAJOR_VERSION < 3
30143  "%.200s() got an unexpected keyword argument '%.200s'",
30144  function_name, PyString_AsString(key));
30145  #else
30146  "%s() got an unexpected keyword argument '%U'",
30147  function_name, key);
30148  #endif
30149 bad:
30150  return -1;
30151 }
30152 
30153 /* ArgTypeTest */
30154 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
30155 {
30156  if (unlikely(!type)) {
30157  PyErr_SetString(PyExc_SystemError, "Missing type object");
30158  return 0;
30159  }
30160  else if (exact) {
30161  #if PY_MAJOR_VERSION == 2
30162  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
30163  #endif
30164  }
30165  else {
30166  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
30167  }
30168  PyErr_Format(PyExc_TypeError,
30169  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
30170  name, type->tp_name, Py_TYPE(obj)->tp_name);
30171  return 0;
30172 }
30173 
30174 /* PyFunctionFastCall */
30175 #if CYTHON_FAST_PYCALL
30176 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
30177  PyObject *globals) {
30178  PyFrameObject *f;
30179  PyThreadState *tstate = __Pyx_PyThreadState_Current;
30180  PyObject **fastlocals;
30181  Py_ssize_t i;
30182  PyObject *result;
30183  assert(globals != NULL);
30184  /* XXX Perhaps we should create a specialized
30185  PyFrame_New() that doesn't take locals, but does
30186  take builtins without sanity checking them.
30187  */
30188  assert(tstate != NULL);
30189  f = PyFrame_New(tstate, co, globals, NULL);
30190  if (f == NULL) {
30191  return NULL;
30192  }
30193  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
30194  for (i = 0; i < na; i++) {
30195  Py_INCREF(*args);
30196  fastlocals[i] = *args++;
30197  }
30198  result = PyEval_EvalFrameEx(f,0);
30199  ++tstate->recursion_depth;
30200  Py_DECREF(f);
30201  --tstate->recursion_depth;
30202  return result;
30203 }
30204 #if 1 || PY_VERSION_HEX < 0x030600B1
30205 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
30206  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
30207  PyObject *globals = PyFunction_GET_GLOBALS(func);
30208  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
30209  PyObject *closure;
30210 #if PY_MAJOR_VERSION >= 3
30211  PyObject *kwdefs;
30212 #endif
30213  PyObject *kwtuple, **k;
30214  PyObject **d;
30215  Py_ssize_t nd;
30216  Py_ssize_t nk;
30217  PyObject *result;
30218  assert(kwargs == NULL || PyDict_Check(kwargs));
30219  nk = kwargs ? PyDict_Size(kwargs) : 0;
30220  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
30221  return NULL;
30222  }
30223  if (
30224 #if PY_MAJOR_VERSION >= 3
30225  co->co_kwonlyargcount == 0 &&
30226 #endif
30227  likely(kwargs == NULL || nk == 0) &&
30228  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
30229  if (argdefs == NULL && co->co_argcount == nargs) {
30230  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
30231  goto done;
30232  }
30233  else if (nargs == 0 && argdefs != NULL
30234  && co->co_argcount == Py_SIZE(argdefs)) {
30235  /* function called with no arguments, but all parameters have
30236  a default value: use default values as arguments .*/
30237  args = &PyTuple_GET_ITEM(argdefs, 0);
30238  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
30239  goto done;
30240  }
30241  }
30242  if (kwargs != NULL) {
30243  Py_ssize_t pos, i;
30244  kwtuple = PyTuple_New(2 * nk);
30245  if (kwtuple == NULL) {
30246  result = NULL;
30247  goto done;
30248  }
30249  k = &PyTuple_GET_ITEM(kwtuple, 0);
30250  pos = i = 0;
30251  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
30252  Py_INCREF(k[i]);
30253  Py_INCREF(k[i+1]);
30254  i += 2;
30255  }
30256  nk = i / 2;
30257  }
30258  else {
30259  kwtuple = NULL;
30260  k = NULL;
30261  }
30262  closure = PyFunction_GET_CLOSURE(func);
30263 #if PY_MAJOR_VERSION >= 3
30264  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
30265 #endif
30266  if (argdefs != NULL) {
30267  d = &PyTuple_GET_ITEM(argdefs, 0);
30268  nd = Py_SIZE(argdefs);
30269  }
30270  else {
30271  d = NULL;
30272  nd = 0;
30273  }
30274 #if PY_MAJOR_VERSION >= 3
30275  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
30276  args, nargs,
30277  k, (int)nk,
30278  d, (int)nd, kwdefs, closure);
30279 #else
30280  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
30281  args, nargs,
30282  k, (int)nk,
30283  d, (int)nd, closure);
30284 #endif
30285  Py_XDECREF(kwtuple);
30286 done:
30287  Py_LeaveRecursiveCall();
30288  return result;
30289 }
30290 #endif
30291 #endif
30292 
30293 /* PyObjectCall */
30294 #if CYTHON_COMPILING_IN_CPYTHON
30295 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
30296  PyObject *result;
30297  ternaryfunc call = func->ob_type->tp_call;
30298  if (unlikely(!call))
30299  return PyObject_Call(func, arg, kw);
30300  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
30301  return NULL;
30302  result = (*call)(func, arg, kw);
30303  Py_LeaveRecursiveCall();
30304  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
30305  PyErr_SetString(
30306  PyExc_SystemError,
30307  "NULL result without error in PyObject_Call");
30308  }
30309  return result;
30310 }
30311 #endif
30312 
30313 /* PyObjectCallMethO */
30314 #if CYTHON_COMPILING_IN_CPYTHON
30315 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
30316  PyObject *self, *result;
30317  PyCFunction cfunc;
30318  cfunc = PyCFunction_GET_FUNCTION(func);
30319  self = PyCFunction_GET_SELF(func);
30320  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
30321  return NULL;
30322  result = cfunc(self, arg);
30323  Py_LeaveRecursiveCall();
30324  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
30325  PyErr_SetString(
30326  PyExc_SystemError,
30327  "NULL result without error in PyObject_Call");
30328  }
30329  return result;
30330 }
30331 #endif
30332 
30333 /* PyObjectCallNoArg */
30334 #if CYTHON_COMPILING_IN_CPYTHON
30335 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
30336 #if CYTHON_FAST_PYCALL
30337  if (PyFunction_Check(func)) {
30338  return __Pyx_PyFunction_FastCall(func, NULL, 0);
30339  }
30340 #endif
30341 #ifdef __Pyx_CyFunction_USED
30342  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
30343 #else
30344  if (likely(PyCFunction_Check(func)))
30345 #endif
30346  {
30347  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
30348  return __Pyx_PyObject_CallMethO(func, NULL);
30349  }
30350  }
30351  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
30352 }
30353 #endif
30354 
30355 /* PyCFunctionFastCall */
30356 #if CYTHON_FAST_PYCCALL
30357 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
30358  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
30359  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
30360  PyObject *self = PyCFunction_GET_SELF(func);
30361  int flags = PyCFunction_GET_FLAGS(func);
30362  assert(PyCFunction_Check(func));
30363  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
30364  assert(nargs >= 0);
30365  assert(nargs == 0 || args != NULL);
30366  /* _PyCFunction_FastCallDict() must not be called with an exception set,
30367  because it may clear it (directly or indirectly) and so the
30368  caller loses its exception */
30369  assert(!PyErr_Occurred());
30370  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
30371  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
30372  } else {
30373  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
30374  }
30375 }
30376 #endif
30377 
30378 /* PyObjectCallOneArg */
30379 #if CYTHON_COMPILING_IN_CPYTHON
30380 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
30381  PyObject *result;
30382  PyObject *args = PyTuple_New(1);
30383  if (unlikely(!args)) return NULL;
30384  Py_INCREF(arg);
30385  PyTuple_SET_ITEM(args, 0, arg);
30386  result = __Pyx_PyObject_Call(func, args, NULL);
30387  Py_DECREF(args);
30388  return result;
30389 }
30390 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
30391 #if CYTHON_FAST_PYCALL
30392  if (PyFunction_Check(func)) {
30393  return __Pyx_PyFunction_FastCall(func, &arg, 1);
30394  }
30395 #endif
30396  if (likely(PyCFunction_Check(func))) {
30397  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
30398  return __Pyx_PyObject_CallMethO(func, arg);
30399 #if CYTHON_FAST_PYCCALL
30400  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
30401  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
30402 #endif
30403  }
30404  }
30405  return __Pyx__PyObject_CallOneArg(func, arg);
30406 }
30407 #else
30408 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
30409  PyObject *result;
30410  PyObject *args = PyTuple_Pack(1, arg);
30411  if (unlikely(!args)) return NULL;
30412  result = __Pyx_PyObject_Call(func, args, NULL);
30413  Py_DECREF(args);
30414  return result;
30415 }
30416 #endif
30417 
30418 /* RaiseTooManyValuesToUnpack */
30419 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
30420  PyErr_Format(PyExc_ValueError,
30421  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
30422 }
30423 
30424 /* RaiseNeedMoreValuesToUnpack */
30425 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
30426  PyErr_Format(PyExc_ValueError,
30427  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
30428  index, (index == 1) ? "" : "s");
30429 }
30430 
30431 /* IterFinish */
30432 static CYTHON_INLINE int __Pyx_IterFinish(void) {
30433 #if CYTHON_FAST_THREAD_STATE
30434  PyThreadState *tstate = __Pyx_PyThreadState_Current;
30435  PyObject* exc_type = tstate->curexc_type;
30436  if (unlikely(exc_type)) {
30437  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
30438  PyObject *exc_value, *exc_tb;
30439  exc_value = tstate->curexc_value;
30440  exc_tb = tstate->curexc_traceback;
30441  tstate->curexc_type = 0;
30442  tstate->curexc_value = 0;
30443  tstate->curexc_traceback = 0;
30444  Py_DECREF(exc_type);
30445  Py_XDECREF(exc_value);
30446  Py_XDECREF(exc_tb);
30447  return 0;
30448  } else {
30449  return -1;
30450  }
30451  }
30452  return 0;
30453 #else
30454  if (unlikely(PyErr_Occurred())) {
30455  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
30456  PyErr_Clear();
30457  return 0;
30458  } else {
30459  return -1;
30460  }
30461  }
30462  return 0;
30463 #endif
30464 }
30465 
30466 /* UnpackItemEndCheck */
30467 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
30468  if (unlikely(retval)) {
30469  Py_DECREF(retval);
30470  __Pyx_RaiseTooManyValuesError(expected);
30471  return -1;
30472  } else {
30473  return __Pyx_IterFinish();
30474  }
30475  return 0;
30476 }
30477 
30478 /* ExtTypeTest */
30479 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
30480  if (unlikely(!type)) {
30481  PyErr_SetString(PyExc_SystemError, "Missing type object");
30482  return 0;
30483  }
30484  if (likely(__Pyx_TypeCheck(obj, type)))
30485  return 1;
30486  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
30487  Py_TYPE(obj)->tp_name, type->tp_name);
30488  return 0;
30489 }
30490 
30491 /* PyErrFetchRestore */
30492 #if CYTHON_FAST_THREAD_STATE
30493 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
30494  PyObject *tmp_type, *tmp_value, *tmp_tb;
30495  tmp_type = tstate->curexc_type;
30496  tmp_value = tstate->curexc_value;
30497  tmp_tb = tstate->curexc_traceback;
30498  tstate->curexc_type = type;
30499  tstate->curexc_value = value;
30500  tstate->curexc_traceback = tb;
30501  Py_XDECREF(tmp_type);
30502  Py_XDECREF(tmp_value);
30503  Py_XDECREF(tmp_tb);
30504 }
30505 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
30506  *type = tstate->curexc_type;
30507  *value = tstate->curexc_value;
30508  *tb = tstate->curexc_traceback;
30509  tstate->curexc_type = 0;
30510  tstate->curexc_value = 0;
30511  tstate->curexc_traceback = 0;
30512 }
30513 #endif
30514 
30515 /* RaiseException */
30516 #if PY_MAJOR_VERSION < 3
30517 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
30518  CYTHON_UNUSED PyObject *cause) {
30519  __Pyx_PyThreadState_declare
30520  Py_XINCREF(type);
30521  if (!value || value == Py_None)
30522  value = NULL;
30523  else
30524  Py_INCREF(value);
30525  if (!tb || tb == Py_None)
30526  tb = NULL;
30527  else {
30528  Py_INCREF(tb);
30529  if (!PyTraceBack_Check(tb)) {
30530  PyErr_SetString(PyExc_TypeError,
30531  "raise: arg 3 must be a traceback or None");
30532  goto raise_error;
30533  }
30534  }
30535  if (PyType_Check(type)) {
30536 #if CYTHON_COMPILING_IN_PYPY
30537  if (!value) {
30538  Py_INCREF(Py_None);
30539  value = Py_None;
30540  }
30541 #endif
30542  PyErr_NormalizeException(&type, &value, &tb);
30543  } else {
30544  if (value) {
30545  PyErr_SetString(PyExc_TypeError,
30546  "instance exception may not have a separate value");
30547  goto raise_error;
30548  }
30549  value = type;
30550  type = (PyObject*) Py_TYPE(type);
30551  Py_INCREF(type);
30552  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
30553  PyErr_SetString(PyExc_TypeError,
30554  "raise: exception class must be a subclass of BaseException");
30555  goto raise_error;
30556  }
30557  }
30558  __Pyx_PyThreadState_assign
30559  __Pyx_ErrRestore(type, value, tb);
30560  return;
30561 raise_error:
30562  Py_XDECREF(value);
30563  Py_XDECREF(type);
30564  Py_XDECREF(tb);
30565  return;
30566 }
30567 #else
30568 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
30569  PyObject* owned_instance = NULL;
30570  if (tb == Py_None) {
30571  tb = 0;
30572  } else if (tb && !PyTraceBack_Check(tb)) {
30573  PyErr_SetString(PyExc_TypeError,
30574  "raise: arg 3 must be a traceback or None");
30575  goto bad;
30576  }
30577  if (value == Py_None)
30578  value = 0;
30579  if (PyExceptionInstance_Check(type)) {
30580  if (value) {
30581  PyErr_SetString(PyExc_TypeError,
30582  "instance exception may not have a separate value");
30583  goto bad;
30584  }
30585  value = type;
30586  type = (PyObject*) Py_TYPE(value);
30587  } else if (PyExceptionClass_Check(type)) {
30588  PyObject *instance_class = NULL;
30589  if (value && PyExceptionInstance_Check(value)) {
30590  instance_class = (PyObject*) Py_TYPE(value);
30591  if (instance_class != type) {
30592  int is_subclass = PyObject_IsSubclass(instance_class, type);
30593  if (!is_subclass) {
30594  instance_class = NULL;
30595  } else if (unlikely(is_subclass == -1)) {
30596  goto bad;
30597  } else {
30598  type = instance_class;
30599  }
30600  }
30601  }
30602  if (!instance_class) {
30603  PyObject *args;
30604  if (!value)
30605  args = PyTuple_New(0);
30606  else if (PyTuple_Check(value)) {
30607  Py_INCREF(value);
30608  args = value;
30609  } else
30610  args = PyTuple_Pack(1, value);
30611  if (!args)
30612  goto bad;
30613  owned_instance = PyObject_Call(type, args, NULL);
30614  Py_DECREF(args);
30615  if (!owned_instance)
30616  goto bad;
30617  value = owned_instance;
30618  if (!PyExceptionInstance_Check(value)) {
30619  PyErr_Format(PyExc_TypeError,
30620  "calling %R should have returned an instance of "
30621  "BaseException, not %R",
30622  type, Py_TYPE(value));
30623  goto bad;
30624  }
30625  }
30626  } else {
30627  PyErr_SetString(PyExc_TypeError,
30628  "raise: exception class must be a subclass of BaseException");
30629  goto bad;
30630  }
30631  if (cause) {
30632  PyObject *fixed_cause;
30633  if (cause == Py_None) {
30634  fixed_cause = NULL;
30635  } else if (PyExceptionClass_Check(cause)) {
30636  fixed_cause = PyObject_CallObject(cause, NULL);
30637  if (fixed_cause == NULL)
30638  goto bad;
30639  } else if (PyExceptionInstance_Check(cause)) {
30640  fixed_cause = cause;
30641  Py_INCREF(fixed_cause);
30642  } else {
30643  PyErr_SetString(PyExc_TypeError,
30644  "exception causes must derive from "
30645  "BaseException");
30646  goto bad;
30647  }
30648  PyException_SetCause(value, fixed_cause);
30649  }
30650  PyErr_SetObject(type, value);
30651  if (tb) {
30652 #if CYTHON_COMPILING_IN_PYPY
30653  PyObject *tmp_type, *tmp_value, *tmp_tb;
30654  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
30655  Py_INCREF(tb);
30656  PyErr_Restore(tmp_type, tmp_value, tb);
30657  Py_XDECREF(tmp_tb);
30658 #else
30659  PyThreadState *tstate = __Pyx_PyThreadState_Current;
30660  PyObject* tmp_tb = tstate->curexc_traceback;
30661  if (tb != tmp_tb) {
30662  Py_INCREF(tb);
30663  tstate->curexc_traceback = tb;
30664  Py_XDECREF(tmp_tb);
30665  }
30666 #endif
30667  }
30668 bad:
30669  Py_XDECREF(owned_instance);
30670  return;
30671 }
30672 #endif
30673 
30674 /* GetModuleGlobalName */
30675 #if CYTHON_USE_DICT_VERSIONS
30676 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
30677 #else
30678 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
30679 #endif
30680 {
30681  PyObject *result;
30682 #if !CYTHON_AVOID_BORROWED_REFS
30683 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
30684  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
30685  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
30686  if (likely(result)) {
30687  return __Pyx_NewRef(result);
30688  } else if (unlikely(PyErr_Occurred())) {
30689  return NULL;
30690  }
30691 #else
30692  result = PyDict_GetItem(__pyx_d, name);
30693  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
30694  if (likely(result)) {
30695  return __Pyx_NewRef(result);
30696  }
30697 #endif
30698 #else
30699  result = PyObject_GetItem(__pyx_d, name);
30700  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
30701  if (likely(result)) {
30702  return __Pyx_NewRef(result);
30703  }
30704  PyErr_Clear();
30705 #endif
30706  return __Pyx_GetBuiltinName(name);
30707 }
30708 
30709 /* PyObjectSetAttrStr */
30710 #if CYTHON_USE_TYPE_SLOTS
30711 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
30712  PyTypeObject* tp = Py_TYPE(obj);
30713  if (likely(tp->tp_setattro))
30714  return tp->tp_setattro(obj, attr_name, value);
30715 #if PY_MAJOR_VERSION < 3
30716  if (likely(tp->tp_setattr))
30717  return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
30718 #endif
30719  return PyObject_SetAttr(obj, attr_name, value);
30720 }
30721 #endif
30722 
30723 /* PyObjectCall2Args */
30724 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
30725  PyObject *args, *result = NULL;
30726  #if CYTHON_FAST_PYCALL
30727  if (PyFunction_Check(function)) {
30728  PyObject *args[2] = {arg1, arg2};
30729  return __Pyx_PyFunction_FastCall(function, args, 2);
30730  }
30731  #endif
30732  #if CYTHON_FAST_PYCCALL
30733  if (__Pyx_PyFastCFunction_Check(function)) {
30734  PyObject *args[2] = {arg1, arg2};
30735  return __Pyx_PyCFunction_FastCall(function, args, 2);
30736  }
30737  #endif
30738  args = PyTuple_New(2);
30739  if (unlikely(!args)) goto done;
30740  Py_INCREF(arg1);
30741  PyTuple_SET_ITEM(args, 0, arg1);
30742  Py_INCREF(arg2);
30743  PyTuple_SET_ITEM(args, 1, arg2);
30744  Py_INCREF(function);
30745  result = __Pyx_PyObject_Call(function, args, NULL);
30746  Py_DECREF(args);
30747  Py_DECREF(function);
30748 done:
30749  return result;
30750 }
30751 
30752 /* PyObjectGetMethod */
30753 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
30754  PyObject *attr;
30755 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
30756  PyTypeObject *tp = Py_TYPE(obj);
30757  PyObject *descr;
30758  descrgetfunc f = NULL;
30759  PyObject **dictptr, *dict;
30760  int meth_found = 0;
30761  assert (*method == NULL);
30762  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
30763  attr = __Pyx_PyObject_GetAttrStr(obj, name);
30764  goto try_unpack;
30765  }
30766  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
30767  return 0;
30768  }
30769  descr = _PyType_Lookup(tp, name);
30770  if (likely(descr != NULL)) {
30771  Py_INCREF(descr);
30772 #if PY_MAJOR_VERSION >= 3
30773  #ifdef __Pyx_CyFunction_USED
30774  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
30775  #else
30776  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
30777  #endif
30778 #else
30779  #ifdef __Pyx_CyFunction_USED
30780  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
30781  #else
30782  if (likely(PyFunction_Check(descr)))
30783  #endif
30784 #endif
30785  {
30786  meth_found = 1;
30787  } else {
30788  f = Py_TYPE(descr)->tp_descr_get;
30789  if (f != NULL && PyDescr_IsData(descr)) {
30790  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
30791  Py_DECREF(descr);
30792  goto try_unpack;
30793  }
30794  }
30795  }
30796  dictptr = _PyObject_GetDictPtr(obj);
30797  if (dictptr != NULL && (dict = *dictptr) != NULL) {
30798  Py_INCREF(dict);
30799  attr = __Pyx_PyDict_GetItemStr(dict, name);
30800  if (attr != NULL) {
30801  Py_INCREF(attr);
30802  Py_DECREF(dict);
30803  Py_XDECREF(descr);
30804  goto try_unpack;
30805  }
30806  Py_DECREF(dict);
30807  }
30808  if (meth_found) {
30809  *method = descr;
30810  return 1;
30811  }
30812  if (f != NULL) {
30813  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
30814  Py_DECREF(descr);
30815  goto try_unpack;
30816  }
30817  if (descr != NULL) {
30818  *method = descr;
30819  return 0;
30820  }
30821  PyErr_Format(PyExc_AttributeError,
30822 #if PY_MAJOR_VERSION >= 3
30823  "'%.50s' object has no attribute '%U'",
30824  tp->tp_name, name);
30825 #else
30826  "'%.50s' object has no attribute '%.400s'",
30827  tp->tp_name, PyString_AS_STRING(name));
30828 #endif
30829  return 0;
30830 #else
30831  attr = __Pyx_PyObject_GetAttrStr(obj, name);
30832  goto try_unpack;
30833 #endif
30834 try_unpack:
30835 #if CYTHON_UNPACK_METHODS
30836  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
30837  PyObject *function = PyMethod_GET_FUNCTION(attr);
30838  Py_INCREF(function);
30839  Py_DECREF(attr);
30840  *method = function;
30841  return 1;
30842  }
30843 #endif
30844  *method = attr;
30845  return 0;
30846 }
30847 
30848 /* PyObjectCallMethod1 */
30849 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
30850  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
30851  Py_DECREF(method);
30852  return result;
30853 }
30854 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
30855  PyObject *method = NULL, *result;
30856  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
30857  if (likely(is_method)) {
30858  result = __Pyx_PyObject_Call2Args(method, obj, arg);
30859  Py_DECREF(method);
30860  return result;
30861  }
30862  if (unlikely(!method)) return NULL;
30863  return __Pyx__PyObject_CallMethod1(method, arg);
30864 }
30865 
30866 /* append */
30867 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
30868  if (likely(PyList_CheckExact(L))) {
30869  if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
30870  } else {
30871  PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
30872  if (unlikely(!retval))
30873  return -1;
30874  Py_DECREF(retval);
30875  }
30876  return 0;
30877 }
30878 
30879 /* GetItemInt */
30880 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
30881  PyObject *r;
30882  if (!j) return NULL;
30883  r = PyObject_GetItem(o, j);
30884  Py_DECREF(j);
30885  return r;
30886 }
30887 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
30888  CYTHON_NCP_UNUSED int wraparound,
30889  CYTHON_NCP_UNUSED int boundscheck) {
30890 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30891  Py_ssize_t wrapped_i = i;
30892  if (wraparound & unlikely(i < 0)) {
30893  wrapped_i += PyList_GET_SIZE(o);
30894  }
30895  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
30896  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
30897  Py_INCREF(r);
30898  return r;
30899  }
30900  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
30901 #else
30902  return PySequence_GetItem(o, i);
30903 #endif
30904 }
30905 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
30906  CYTHON_NCP_UNUSED int wraparound,
30907  CYTHON_NCP_UNUSED int boundscheck) {
30908 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30909  Py_ssize_t wrapped_i = i;
30910  if (wraparound & unlikely(i < 0)) {
30911  wrapped_i += PyTuple_GET_SIZE(o);
30912  }
30913  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
30914  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
30915  Py_INCREF(r);
30916  return r;
30917  }
30918  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
30919 #else
30920  return PySequence_GetItem(o, i);
30921 #endif
30922 }
30923 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
30924  CYTHON_NCP_UNUSED int wraparound,
30925  CYTHON_NCP_UNUSED int boundscheck) {
30926 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
30927  if (is_list || PyList_CheckExact(o)) {
30928  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
30929  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
30930  PyObject *r = PyList_GET_ITEM(o, n);
30931  Py_INCREF(r);
30932  return r;
30933  }
30934  }
30935  else if (PyTuple_CheckExact(o)) {
30936  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
30937  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
30938  PyObject *r = PyTuple_GET_ITEM(o, n);
30939  Py_INCREF(r);
30940  return r;
30941  }
30942  } else {
30943  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
30944  if (likely(m && m->sq_item)) {
30945  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
30946  Py_ssize_t l = m->sq_length(o);
30947  if (likely(l >= 0)) {
30948  i += l;
30949  } else {
30950  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
30951  return NULL;
30952  PyErr_Clear();
30953  }
30954  }
30955  return m->sq_item(o, i);
30956  }
30957  }
30958 #else
30959  if (is_list || PySequence_Check(o)) {
30960  return PySequence_GetItem(o, i);
30961  }
30962 #endif
30963  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
30964 }
30965 
30966 /* ObjectGetItem */
30967 #if CYTHON_USE_TYPE_SLOTS
30968 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
30969  PyObject *runerr;
30970  Py_ssize_t key_value;
30971  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
30972  if (unlikely(!(m && m->sq_item))) {
30973  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
30974  return NULL;
30975  }
30976  key_value = __Pyx_PyIndex_AsSsize_t(index);
30977  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
30978  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
30979  }
30980  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
30981  PyErr_Clear();
30982  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
30983  }
30984  return NULL;
30985 }
30986 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
30987  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
30988  if (likely(m && m->mp_subscript)) {
30989  return m->mp_subscript(obj, key);
30990  }
30991  return __Pyx_PyObject_GetIndex(obj, key);
30992 }
30993 #endif
30994 
30995 /* PyIntBinop */
30996 #if !CYTHON_COMPILING_IN_PYPY
30997 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
30998  #if PY_MAJOR_VERSION < 3
30999  if (likely(PyInt_CheckExact(op1))) {
31000  const long b = intval;
31001  long x;
31002  long a = PyInt_AS_LONG(op1);
31003  x = (long)((unsigned long)a + b);
31004  if (likely((x^a) >= 0 || (x^b) >= 0))
31005  return PyInt_FromLong(x);
31006  return PyLong_Type.tp_as_number->nb_add(op1, op2);
31007  }
31008  #endif
31009  #if CYTHON_USE_PYLONG_INTERNALS
31010  if (likely(PyLong_CheckExact(op1))) {
31011  const long b = intval;
31012  long a, x;
31013 #ifdef HAVE_LONG_LONG
31014  const PY_LONG_LONG llb = intval;
31015  PY_LONG_LONG lla, llx;
31016 #endif
31017  const digit* digits = ((PyLongObject*)op1)->ob_digit;
31018  const Py_ssize_t size = Py_SIZE(op1);
31019  if (likely(__Pyx_sst_abs(size) <= 1)) {
31020  a = likely(size) ? digits[0] : 0;
31021  if (size == -1) a = -a;
31022  } else {
31023  switch (size) {
31024  case -2:
31025  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31026  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31027  break;
31028 #ifdef HAVE_LONG_LONG
31029  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
31030  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31031  goto long_long;
31032 #endif
31033  }
31034  CYTHON_FALLTHROUGH;
31035  case 2:
31036  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
31037  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31038  break;
31039 #ifdef HAVE_LONG_LONG
31040  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
31041  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31042  goto long_long;
31043 #endif
31044  }
31045  CYTHON_FALLTHROUGH;
31046  case -3:
31047  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31048  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31049  break;
31050 #ifdef HAVE_LONG_LONG
31051  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
31052  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31053  goto long_long;
31054 #endif
31055  }
31056  CYTHON_FALLTHROUGH;
31057  case 3:
31058  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
31059  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31060  break;
31061 #ifdef HAVE_LONG_LONG
31062  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
31063  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31064  goto long_long;
31065 #endif
31066  }
31067  CYTHON_FALLTHROUGH;
31068  case -4:
31069  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31070  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31071  break;
31072 #ifdef HAVE_LONG_LONG
31073  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
31074  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31075  goto long_long;
31076 #endif
31077  }
31078  CYTHON_FALLTHROUGH;
31079  case 4:
31080  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
31081  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
31082  break;
31083 #ifdef HAVE_LONG_LONG
31084  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
31085  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
31086  goto long_long;
31087 #endif
31088  }
31089  CYTHON_FALLTHROUGH;
31090  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
31091  }
31092  }
31093  x = a + b;
31094  return PyLong_FromLong(x);
31095 #ifdef HAVE_LONG_LONG
31096  long_long:
31097  llx = lla + llb;
31098  return PyLong_FromLongLong(llx);
31099 #endif
31100 
31101 
31102  }
31103  #endif
31104  if (PyFloat_CheckExact(op1)) {
31105  const long b = intval;
31106  double a = PyFloat_AS_DOUBLE(op1);
31107  double result;
31108  PyFPE_START_PROTECT("add", return NULL)
31109  result = ((double)a) + (double)b;
31110  PyFPE_END_PROTECT(result)
31111  return PyFloat_FromDouble(result);
31112  }
31113  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
31114 }
31115 #endif
31116 
31117 /* SliceObject */
31118 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
31119  Py_ssize_t cstart, Py_ssize_t cstop,
31120  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
31121  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
31122 #if CYTHON_USE_TYPE_SLOTS
31123  PyMappingMethods* mp;
31124 #if PY_MAJOR_VERSION < 3
31125  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
31126  if (likely(ms && ms->sq_ass_slice)) {
31127  if (!has_cstart) {
31128  if (_py_start && (*_py_start != Py_None)) {
31129  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
31130  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
31131  } else
31132  cstart = 0;
31133  }
31134  if (!has_cstop) {
31135  if (_py_stop && (*_py_stop != Py_None)) {
31136  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
31137  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
31138  } else
31139  cstop = PY_SSIZE_T_MAX;
31140  }
31141  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
31142  Py_ssize_t l = ms->sq_length(obj);
31143  if (likely(l >= 0)) {
31144  if (cstop < 0) {
31145  cstop += l;
31146  if (cstop < 0) cstop = 0;
31147  }
31148  if (cstart < 0) {
31149  cstart += l;
31150  if (cstart < 0) cstart = 0;
31151  }
31152  } else {
31153  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
31154  goto bad;
31155  PyErr_Clear();
31156  }
31157  }
31158  return ms->sq_ass_slice(obj, cstart, cstop, value);
31159  }
31160 #endif
31161  mp = Py_TYPE(obj)->tp_as_mapping;
31162  if (likely(mp && mp->mp_ass_subscript))
31163 #endif
31164  {
31165  int result;
31166  PyObject *py_slice, *py_start, *py_stop;
31167  if (_py_slice) {
31168  py_slice = *_py_slice;
31169  } else {
31170  PyObject* owned_start = NULL;
31171  PyObject* owned_stop = NULL;
31172  if (_py_start) {
31173  py_start = *_py_start;
31174  } else {
31175  if (has_cstart) {
31176  owned_start = py_start = PyInt_FromSsize_t(cstart);
31177  if (unlikely(!py_start)) goto bad;
31178  } else
31179  py_start = Py_None;
31180  }
31181  if (_py_stop) {
31182  py_stop = *_py_stop;
31183  } else {
31184  if (has_cstop) {
31185  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
31186  if (unlikely(!py_stop)) {
31187  Py_XDECREF(owned_start);
31188  goto bad;
31189  }
31190  } else
31191  py_stop = Py_None;
31192  }
31193  py_slice = PySlice_New(py_start, py_stop, Py_None);
31194  Py_XDECREF(owned_start);
31195  Py_XDECREF(owned_stop);
31196  if (unlikely(!py_slice)) goto bad;
31197  }
31198 #if CYTHON_USE_TYPE_SLOTS
31199  result = mp->mp_ass_subscript(obj, py_slice, value);
31200 #else
31201  result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
31202 #endif
31203  if (!_py_slice) {
31204  Py_DECREF(py_slice);
31205  }
31206  return result;
31207  }
31208  PyErr_Format(PyExc_TypeError,
31209  "'%.200s' object does not support slice %.10s",
31210  Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
31211 bad:
31212  return -1;
31213 }
31214 
31215 /* DictGetItem */
31216 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
31217 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
31218  PyObject *value;
31219  value = PyDict_GetItemWithError(d, key);
31220  if (unlikely(!value)) {
31221  if (!PyErr_Occurred()) {
31222  if (unlikely(PyTuple_Check(key))) {
31223  PyObject* args = PyTuple_Pack(1, key);
31224  if (likely(args)) {
31225  PyErr_SetObject(PyExc_KeyError, args);
31226  Py_DECREF(args);
31227  }
31228  } else {
31229  PyErr_SetObject(PyExc_KeyError, key);
31230  }
31231  }
31232  return NULL;
31233  }
31234  Py_INCREF(value);
31235  return value;
31236 }
31237 #endif
31238 
31239 /* SliceObject */
31240 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
31241  Py_ssize_t cstart, Py_ssize_t cstop,
31242  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
31243  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
31244 #if CYTHON_USE_TYPE_SLOTS
31245  PyMappingMethods* mp;
31246 #if PY_MAJOR_VERSION < 3
31247  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
31248  if (likely(ms && ms->sq_slice)) {
31249  if (!has_cstart) {
31250  if (_py_start && (*_py_start != Py_None)) {
31251  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
31252  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
31253  } else
31254  cstart = 0;
31255  }
31256  if (!has_cstop) {
31257  if (_py_stop && (*_py_stop != Py_None)) {
31258  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
31259  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
31260  } else
31261  cstop = PY_SSIZE_T_MAX;
31262  }
31263  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
31264  Py_ssize_t l = ms->sq_length(obj);
31265  if (likely(l >= 0)) {
31266  if (cstop < 0) {
31267  cstop += l;
31268  if (cstop < 0) cstop = 0;
31269  }
31270  if (cstart < 0) {
31271  cstart += l;
31272  if (cstart < 0) cstart = 0;
31273  }
31274  } else {
31275  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
31276  goto bad;
31277  PyErr_Clear();
31278  }
31279  }
31280  return ms->sq_slice(obj, cstart, cstop);
31281  }
31282 #endif
31283  mp = Py_TYPE(obj)->tp_as_mapping;
31284  if (likely(mp && mp->mp_subscript))
31285 #endif
31286  {
31287  PyObject* result;
31288  PyObject *py_slice, *py_start, *py_stop;
31289  if (_py_slice) {
31290  py_slice = *_py_slice;
31291  } else {
31292  PyObject* owned_start = NULL;
31293  PyObject* owned_stop = NULL;
31294  if (_py_start) {
31295  py_start = *_py_start;
31296  } else {
31297  if (has_cstart) {
31298  owned_start = py_start = PyInt_FromSsize_t(cstart);
31299  if (unlikely(!py_start)) goto bad;
31300  } else
31301  py_start = Py_None;
31302  }
31303  if (_py_stop) {
31304  py_stop = *_py_stop;
31305  } else {
31306  if (has_cstop) {
31307  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
31308  if (unlikely(!py_stop)) {
31309  Py_XDECREF(owned_start);
31310  goto bad;
31311  }
31312  } else
31313  py_stop = Py_None;
31314  }
31315  py_slice = PySlice_New(py_start, py_stop, Py_None);
31316  Py_XDECREF(owned_start);
31317  Py_XDECREF(owned_stop);
31318  if (unlikely(!py_slice)) goto bad;
31319  }
31320 #if CYTHON_USE_TYPE_SLOTS
31321  result = mp->mp_subscript(obj, py_slice);
31322 #else
31323  result = PyObject_GetItem(obj, py_slice);
31324 #endif
31325  if (!_py_slice) {
31326  Py_DECREF(py_slice);
31327  }
31328  return result;
31329  }
31330  PyErr_Format(PyExc_TypeError,
31331  "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
31332 bad:
31333  return NULL;
31334 }
31335 
31336 /* Import */
31337 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
31338  PyObject *empty_list = 0;
31339  PyObject *module = 0;
31340  PyObject *global_dict = 0;
31341  PyObject *empty_dict = 0;
31342  PyObject *list;
31343  #if PY_MAJOR_VERSION < 3
31344  PyObject *py_import;
31345  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
31346  if (!py_import)
31347  goto bad;
31348  #endif
31349  if (from_list)
31350  list = from_list;
31351  else {
31352  empty_list = PyList_New(0);
31353  if (!empty_list)
31354  goto bad;
31355  list = empty_list;
31356  }
31357  global_dict = PyModule_GetDict(__pyx_m);
31358  if (!global_dict)
31359  goto bad;
31360  empty_dict = PyDict_New();
31361  if (!empty_dict)
31362  goto bad;
31363  {
31364  #if PY_MAJOR_VERSION >= 3
31365  if (level == -1) {
31366  if (strchr(__Pyx_MODULE_NAME, '.')) {
31367  module = PyImport_ImportModuleLevelObject(
31368  name, global_dict, empty_dict, list, 1);
31369  if (!module) {
31370  if (!PyErr_ExceptionMatches(PyExc_ImportError))
31371  goto bad;
31372  PyErr_Clear();
31373  }
31374  }
31375  level = 0;
31376  }
31377  #endif
31378  if (!module) {
31379  #if PY_MAJOR_VERSION < 3
31380  PyObject *py_level = PyInt_FromLong(level);
31381  if (!py_level)
31382  goto bad;
31383  module = PyObject_CallFunctionObjArgs(py_import,
31384  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
31385  Py_DECREF(py_level);
31386  #else
31387  module = PyImport_ImportModuleLevelObject(
31388  name, global_dict, empty_dict, list, level);
31389  #endif
31390  }
31391  }
31392 bad:
31393  #if PY_MAJOR_VERSION < 3
31394  Py_XDECREF(py_import);
31395  #endif
31396  Py_XDECREF(empty_list);
31397  Py_XDECREF(empty_dict);
31398  return module;
31399 }
31400 
31401 /* ImportFrom */
31402 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
31403  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
31404  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
31405  PyErr_Format(PyExc_ImportError,
31406  #if PY_MAJOR_VERSION < 3
31407  "cannot import name %.230s", PyString_AS_STRING(name));
31408  #else
31409  "cannot import name %S", name);
31410  #endif
31411  }
31412  return value;
31413 }
31414 
31415 /* BytesEquals */
31416 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
31417 #if CYTHON_COMPILING_IN_PYPY
31418  return PyObject_RichCompareBool(s1, s2, equals);
31419 #else
31420  if (s1 == s2) {
31421  return (equals == Py_EQ);
31422  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
31423  const char *ps1, *ps2;
31424  Py_ssize_t length = PyBytes_GET_SIZE(s1);
31425  if (length != PyBytes_GET_SIZE(s2))
31426  return (equals == Py_NE);
31427  ps1 = PyBytes_AS_STRING(s1);
31428  ps2 = PyBytes_AS_STRING(s2);
31429  if (ps1[0] != ps2[0]) {
31430  return (equals == Py_NE);
31431  } else if (length == 1) {
31432  return (equals == Py_EQ);
31433  } else {
31434  int result;
31435 #if CYTHON_USE_UNICODE_INTERNALS
31436  Py_hash_t hash1, hash2;
31437  hash1 = ((PyBytesObject*)s1)->ob_shash;
31438  hash2 = ((PyBytesObject*)s2)->ob_shash;
31439  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
31440  return (equals == Py_NE);
31441  }
31442 #endif
31443  result = memcmp(ps1, ps2, (size_t)length);
31444  return (equals == Py_EQ) ? (result == 0) : (result != 0);
31445  }
31446  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
31447  return (equals == Py_NE);
31448  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
31449  return (equals == Py_NE);
31450  } else {
31451  int result;
31452  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
31453  if (!py_result)
31454  return -1;
31455  result = __Pyx_PyObject_IsTrue(py_result);
31456  Py_DECREF(py_result);
31457  return result;
31458  }
31459 #endif
31460 }
31461 
31462 /* UnicodeEquals */
31463 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
31464 #if CYTHON_COMPILING_IN_PYPY
31465  return PyObject_RichCompareBool(s1, s2, equals);
31466 #else
31467 #if PY_MAJOR_VERSION < 3
31468  PyObject* owned_ref = NULL;
31469 #endif
31470  int s1_is_unicode, s2_is_unicode;
31471  if (s1 == s2) {
31472  goto return_eq;
31473  }
31474  s1_is_unicode = PyUnicode_CheckExact(s1);
31475  s2_is_unicode = PyUnicode_CheckExact(s2);
31476 #if PY_MAJOR_VERSION < 3
31477  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
31478  owned_ref = PyUnicode_FromObject(s2);
31479  if (unlikely(!owned_ref))
31480  return -1;
31481  s2 = owned_ref;
31482  s2_is_unicode = 1;
31483  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
31484  owned_ref = PyUnicode_FromObject(s1);
31485  if (unlikely(!owned_ref))
31486  return -1;
31487  s1 = owned_ref;
31488  s1_is_unicode = 1;
31489  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
31490  return __Pyx_PyBytes_Equals(s1, s2, equals);
31491  }
31492 #endif
31493  if (s1_is_unicode & s2_is_unicode) {
31494  Py_ssize_t length;
31495  int kind;
31496  void *data1, *data2;
31497  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
31498  return -1;
31499  length = __Pyx_PyUnicode_GET_LENGTH(s1);
31500  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
31501  goto return_ne;
31502  }
31503 #if CYTHON_USE_UNICODE_INTERNALS
31504  {
31505  Py_hash_t hash1, hash2;
31506  #if CYTHON_PEP393_ENABLED
31507  hash1 = ((PyASCIIObject*)s1)->hash;
31508  hash2 = ((PyASCIIObject*)s2)->hash;
31509  #else
31510  hash1 = ((PyUnicodeObject*)s1)->hash;
31511  hash2 = ((PyUnicodeObject*)s2)->hash;
31512  #endif
31513  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
31514  goto return_ne;
31515  }
31516  }
31517 #endif
31518  kind = __Pyx_PyUnicode_KIND(s1);
31519  if (kind != __Pyx_PyUnicode_KIND(s2)) {
31520  goto return_ne;
31521  }
31522  data1 = __Pyx_PyUnicode_DATA(s1);
31523  data2 = __Pyx_PyUnicode_DATA(s2);
31524  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
31525  goto return_ne;
31526  } else if (length == 1) {
31527  goto return_eq;
31528  } else {
31529  int result = memcmp(data1, data2, (size_t)(length * kind));
31530  #if PY_MAJOR_VERSION < 3
31531  Py_XDECREF(owned_ref);
31532  #endif
31533  return (equals == Py_EQ) ? (result == 0) : (result != 0);
31534  }
31535  } else if ((s1 == Py_None) & s2_is_unicode) {
31536  goto return_ne;
31537  } else if ((s2 == Py_None) & s1_is_unicode) {
31538  goto return_ne;
31539  } else {
31540  int result;
31541  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
31542  #if PY_MAJOR_VERSION < 3
31543  Py_XDECREF(owned_ref);
31544  #endif
31545  if (!py_result)
31546  return -1;
31547  result = __Pyx_PyObject_IsTrue(py_result);
31548  Py_DECREF(py_result);
31549  return result;
31550  }
31551 return_eq:
31552  #if PY_MAJOR_VERSION < 3
31553  Py_XDECREF(owned_ref);
31554  #endif
31555  return (equals == Py_EQ);
31556 return_ne:
31557  #if PY_MAJOR_VERSION < 3
31558  Py_XDECREF(owned_ref);
31559  #endif
31560  return (equals == Py_NE);
31561 #endif
31562 }
31563 
31564 /* PyIntCompare */
31565 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
31566  if (op1 == op2) {
31567  Py_RETURN_TRUE;
31568  }
31569  #if PY_MAJOR_VERSION < 3
31570  if (likely(PyInt_CheckExact(op1))) {
31571  const long b = intval;
31572  long a = PyInt_AS_LONG(op1);
31573  if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
31574  }
31575  #endif
31576  #if CYTHON_USE_PYLONG_INTERNALS
31577  if (likely(PyLong_CheckExact(op1))) {
31578  int unequal;
31579  unsigned long uintval;
31580  Py_ssize_t size = Py_SIZE(op1);
31581  const digit* digits = ((PyLongObject*)op1)->ob_digit;
31582  if (intval == 0) {
31583  if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
31584  } else if (intval < 0) {
31585  if (size >= 0)
31586  Py_RETURN_FALSE;
31587  intval = -intval;
31588  size = -size;
31589  } else {
31590  if (size <= 0)
31591  Py_RETURN_FALSE;
31592  }
31593  uintval = (unsigned long) intval;
31594 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
31595  if (uintval >> (PyLong_SHIFT * 4)) {
31596  unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
31597  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
31598  } else
31599 #endif
31600 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
31601  if (uintval >> (PyLong_SHIFT * 3)) {
31602  unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
31603  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
31604  } else
31605 #endif
31606 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
31607  if (uintval >> (PyLong_SHIFT * 2)) {
31608  unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
31609  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
31610  } else
31611 #endif
31612 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
31613  if (uintval >> (PyLong_SHIFT * 1)) {
31614  unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
31615  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
31616  } else
31617 #endif
31618  unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
31619  if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
31620  }
31621  #endif
31622  if (PyFloat_CheckExact(op1)) {
31623  const long b = intval;
31624  double a = PyFloat_AS_DOUBLE(op1);
31625  if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
31626  }
31627  return (
31628  PyObject_RichCompare(op1, op2, Py_EQ));
31629 }
31630 
31631 /* PyObjectCallMethod0 */
31632 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
31633  PyObject *method = NULL, *result = NULL;
31634  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
31635  if (likely(is_method)) {
31636  result = __Pyx_PyObject_CallOneArg(method, obj);
31637  Py_DECREF(method);
31638  return result;
31639  }
31640  if (unlikely(!method)) goto bad;
31641  result = __Pyx_PyObject_CallNoArg(method);
31642  Py_DECREF(method);
31643 bad:
31644  return result;
31645 }
31646 
31647 /* RaiseNoneIterError */
31648 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
31649  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
31650 }
31651 
31652 /* UnpackTupleError */
31653 static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
31654  if (t == Py_None) {
31655  __Pyx_RaiseNoneNotIterableError();
31656  } else if (PyTuple_GET_SIZE(t) < index) {
31657  __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
31658  } else {
31659  __Pyx_RaiseTooManyValuesError(index);
31660  }
31661 }
31662 
31663 /* UnpackTuple2 */
31664 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
31665  PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
31666  PyObject *value1 = NULL, *value2 = NULL;
31667 #if CYTHON_COMPILING_IN_PYPY
31668  value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad;
31669  value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad;
31670 #else
31671  value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1);
31672  value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2);
31673 #endif
31674  if (decref_tuple) {
31675  Py_DECREF(tuple);
31676  }
31677  *pvalue1 = value1;
31678  *pvalue2 = value2;
31679  return 0;
31680 #if CYTHON_COMPILING_IN_PYPY
31681 bad:
31682  Py_XDECREF(value1);
31683  Py_XDECREF(value2);
31684  if (decref_tuple) { Py_XDECREF(tuple); }
31685  return -1;
31686 #endif
31687 }
31688 static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
31689  int has_known_size, int decref_tuple) {
31690  Py_ssize_t index;
31691  PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
31692  iternextfunc iternext;
31693  iter = PyObject_GetIter(tuple);
31694  if (unlikely(!iter)) goto bad;
31695  if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
31696  iternext = Py_TYPE(iter)->tp_iternext;
31697  value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
31698  value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
31699  if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
31700  Py_DECREF(iter);
31701  *pvalue1 = value1;
31702  *pvalue2 = value2;
31703  return 0;
31704 unpacking_failed:
31705  if (!has_known_size && __Pyx_IterFinish() == 0)
31706  __Pyx_RaiseNeedMoreValuesError(index);
31707 bad:
31708  Py_XDECREF(iter);
31709  Py_XDECREF(value1);
31710  Py_XDECREF(value2);
31711  if (decref_tuple) { Py_XDECREF(tuple); }
31712  return -1;
31713 }
31714 
31715 /* dict_iter */
31716 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
31717  Py_ssize_t* p_orig_length, int* p_source_is_dict) {
31718  is_dict = is_dict || likely(PyDict_CheckExact(iterable));
31719  *p_source_is_dict = is_dict;
31720  if (is_dict) {
31721 #if !CYTHON_COMPILING_IN_PYPY
31722  *p_orig_length = PyDict_Size(iterable);
31723  Py_INCREF(iterable);
31724  return iterable;
31725 #elif PY_MAJOR_VERSION >= 3
31726  static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
31727  PyObject **pp = NULL;
31728  if (method_name) {
31729  const char *name = PyUnicode_AsUTF8(method_name);
31730  if (strcmp(name, "iteritems") == 0) pp = &py_items;
31731  else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
31732  else if (strcmp(name, "itervalues") == 0) pp = &py_values;
31733  if (pp) {
31734  if (!*pp) {
31735  *pp = PyUnicode_FromString(name + 4);
31736  if (!*pp)
31737  return NULL;
31738  }
31739  method_name = *pp;
31740  }
31741  }
31742 #endif
31743  }
31744  *p_orig_length = 0;
31745  if (method_name) {
31746  PyObject* iter;
31747  iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
31748  if (!iterable)
31749  return NULL;
31750 #if !CYTHON_COMPILING_IN_PYPY
31751  if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
31752  return iterable;
31753 #endif
31754  iter = PyObject_GetIter(iterable);
31755  Py_DECREF(iterable);
31756  return iter;
31757  }
31758  return PyObject_GetIter(iterable);
31759 }
31760 static CYTHON_INLINE int __Pyx_dict_iter_next(
31761  PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
31762  PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
31763  PyObject* next_item;
31764 #if !CYTHON_COMPILING_IN_PYPY
31765  if (source_is_dict) {
31766  PyObject *key, *value;
31767  if (unlikely(orig_length != PyDict_Size(iter_obj))) {
31768  PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
31769  return -1;
31770  }
31771  if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
31772  return 0;
31773  }
31774  if (pitem) {
31775  PyObject* tuple = PyTuple_New(2);
31776  if (unlikely(!tuple)) {
31777  return -1;
31778  }
31779  Py_INCREF(key);
31780  Py_INCREF(value);
31781  PyTuple_SET_ITEM(tuple, 0, key);
31782  PyTuple_SET_ITEM(tuple, 1, value);
31783  *pitem = tuple;
31784  } else {
31785  if (pkey) {
31786  Py_INCREF(key);
31787  *pkey = key;
31788  }
31789  if (pvalue) {
31790  Py_INCREF(value);
31791  *pvalue = value;
31792  }
31793  }
31794  return 1;
31795  } else if (PyTuple_CheckExact(iter_obj)) {
31796  Py_ssize_t pos = *ppos;
31797  if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
31798  *ppos = pos + 1;
31799  next_item = PyTuple_GET_ITEM(iter_obj, pos);
31800  Py_INCREF(next_item);
31801  } else if (PyList_CheckExact(iter_obj)) {
31802  Py_ssize_t pos = *ppos;
31803  if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
31804  *ppos = pos + 1;
31805  next_item = PyList_GET_ITEM(iter_obj, pos);
31806  Py_INCREF(next_item);
31807  } else
31808 #endif
31809  {
31810  next_item = PyIter_Next(iter_obj);
31811  if (unlikely(!next_item)) {
31812  return __Pyx_IterFinish();
31813  }
31814  }
31815  if (pitem) {
31816  *pitem = next_item;
31817  } else if (pkey && pvalue) {
31818  if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
31819  return -1;
31820  } else if (pkey) {
31821  *pkey = next_item;
31822  } else {
31823  *pvalue = next_item;
31824  }
31825  return 1;
31826 }
31827 
31828 /* GetTopmostException */
31829 #if CYTHON_USE_EXC_INFO_STACK
31830 static _PyErr_StackItem *
31831 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
31832 {
31833  _PyErr_StackItem *exc_info = tstate->exc_info;
31834  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
31835  exc_info->previous_item != NULL)
31836  {
31837  exc_info = exc_info->previous_item;
31838  }
31839  return exc_info;
31840 }
31841 #endif
31842 
31843 /* SaveResetException */
31844 #if CYTHON_FAST_THREAD_STATE
31845 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
31846  #if CYTHON_USE_EXC_INFO_STACK
31847  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
31848  *type = exc_info->exc_type;
31849  *value = exc_info->exc_value;
31850  *tb = exc_info->exc_traceback;
31851  #else
31852  *type = tstate->exc_type;
31853  *value = tstate->exc_value;
31854  *tb = tstate->exc_traceback;
31855  #endif
31856  Py_XINCREF(*type);
31857  Py_XINCREF(*value);
31858  Py_XINCREF(*tb);
31859 }
31860 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
31861  PyObject *tmp_type, *tmp_value, *tmp_tb;
31862  #if CYTHON_USE_EXC_INFO_STACK
31863  _PyErr_StackItem *exc_info = tstate->exc_info;
31864  tmp_type = exc_info->exc_type;
31865  tmp_value = exc_info->exc_value;
31866  tmp_tb = exc_info->exc_traceback;
31867  exc_info->exc_type = type;
31868  exc_info->exc_value = value;
31869  exc_info->exc_traceback = tb;
31870  #else
31871  tmp_type = tstate->exc_type;
31872  tmp_value = tstate->exc_value;
31873  tmp_tb = tstate->exc_traceback;
31874  tstate->exc_type = type;
31875  tstate->exc_value = value;
31876  tstate->exc_traceback = tb;
31877  #endif
31878  Py_XDECREF(tmp_type);
31879  Py_XDECREF(tmp_value);
31880  Py_XDECREF(tmp_tb);
31881 }
31882 #endif
31883 
31884 /* PyErrExceptionMatches */
31885 #if CYTHON_FAST_THREAD_STATE
31886 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
31887  Py_ssize_t i, n;
31888  n = PyTuple_GET_SIZE(tuple);
31889 #if PY_MAJOR_VERSION >= 3
31890  for (i=0; i<n; i++) {
31891  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
31892  }
31893 #endif
31894  for (i=0; i<n; i++) {
31895  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
31896  }
31897  return 0;
31898 }
31899 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
31900  PyObject *exc_type = tstate->curexc_type;
31901  if (exc_type == err) return 1;
31902  if (unlikely(!exc_type)) return 0;
31903  if (unlikely(PyTuple_Check(err)))
31904  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
31905  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
31906 }
31907 #endif
31908 
31909 /* GetException */
31910 #if CYTHON_FAST_THREAD_STATE
31911 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
31912 #else
31913 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
31914 #endif
31915 {
31916  PyObject *local_type, *local_value, *local_tb;
31917 #if CYTHON_FAST_THREAD_STATE
31918  PyObject *tmp_type, *tmp_value, *tmp_tb;
31919  local_type = tstate->curexc_type;
31920  local_value = tstate->curexc_value;
31921  local_tb = tstate->curexc_traceback;
31922  tstate->curexc_type = 0;
31923  tstate->curexc_value = 0;
31924  tstate->curexc_traceback = 0;
31925 #else
31926  PyErr_Fetch(&local_type, &local_value, &local_tb);
31927 #endif
31928  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
31929 #if CYTHON_FAST_THREAD_STATE
31930  if (unlikely(tstate->curexc_type))
31931 #else
31932  if (unlikely(PyErr_Occurred()))
31933 #endif
31934  goto bad;
31935  #if PY_MAJOR_VERSION >= 3
31936  if (local_tb) {
31937  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
31938  goto bad;
31939  }
31940  #endif
31941  Py_XINCREF(local_tb);
31942  Py_XINCREF(local_type);
31943  Py_XINCREF(local_value);
31944  *type = local_type;
31945  *value = local_value;
31946  *tb = local_tb;
31947 #if CYTHON_FAST_THREAD_STATE
31948  #if CYTHON_USE_EXC_INFO_STACK
31949  {
31950  _PyErr_StackItem *exc_info = tstate->exc_info;
31951  tmp_type = exc_info->exc_type;
31952  tmp_value = exc_info->exc_value;
31953  tmp_tb = exc_info->exc_traceback;
31954  exc_info->exc_type = local_type;
31955  exc_info->exc_value = local_value;
31956  exc_info->exc_traceback = local_tb;
31957  }
31958  #else
31959  tmp_type = tstate->exc_type;
31960  tmp_value = tstate->exc_value;
31961  tmp_tb = tstate->exc_traceback;
31962  tstate->exc_type = local_type;
31963  tstate->exc_value = local_value;
31964  tstate->exc_traceback = local_tb;
31965  #endif
31966  Py_XDECREF(tmp_type);
31967  Py_XDECREF(tmp_value);
31968  Py_XDECREF(tmp_tb);
31969 #else
31970  PyErr_SetExcInfo(local_type, local_value, local_tb);
31971 #endif
31972  return 0;
31973 bad:
31974  *type = 0;
31975  *value = 0;
31976  *tb = 0;
31977  Py_XDECREF(local_type);
31978  Py_XDECREF(local_value);
31979  Py_XDECREF(local_tb);
31980  return -1;
31981 }
31982 
31983 /* PyObject_GenericGetAttrNoDict */
31984 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
31985 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
31986  PyErr_Format(PyExc_AttributeError,
31987 #if PY_MAJOR_VERSION >= 3
31988  "'%.50s' object has no attribute '%U'",
31989  tp->tp_name, attr_name);
31990 #else
31991  "'%.50s' object has no attribute '%.400s'",
31992  tp->tp_name, PyString_AS_STRING(attr_name));
31993 #endif
31994  return NULL;
31995 }
31996 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
31997  PyObject *descr;
31998  PyTypeObject *tp = Py_TYPE(obj);
31999  if (unlikely(!PyString_Check(attr_name))) {
32000  return PyObject_GenericGetAttr(obj, attr_name);
32001  }
32002  assert(!tp->tp_dictoffset);
32003  descr = _PyType_Lookup(tp, attr_name);
32004  if (unlikely(!descr)) {
32005  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
32006  }
32007  Py_INCREF(descr);
32008  #if PY_MAJOR_VERSION < 3
32009  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
32010  #endif
32011  {
32012  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
32013  if (unlikely(f)) {
32014  PyObject *res = f(descr, obj, (PyObject *)tp);
32015  Py_DECREF(descr);
32016  return res;
32017  }
32018  }
32019  return descr;
32020 }
32021 #endif
32022 
32023 /* PyObject_GenericGetAttr */
32024 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
32025 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
32026  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
32027  return PyObject_GenericGetAttr(obj, attr_name);
32028  }
32029  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
32030 }
32031 #endif
32032 
32033 /* SetupReduce */
32034 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
32035  int ret;
32036  PyObject *name_attr;
32037  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
32038  if (likely(name_attr)) {
32039  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
32040  } else {
32041  ret = -1;
32042  }
32043  if (unlikely(ret < 0)) {
32044  PyErr_Clear();
32045  ret = 0;
32046  }
32047  Py_XDECREF(name_attr);
32048  return ret;
32049 }
32050 static int __Pyx_setup_reduce(PyObject* type_obj) {
32051  int ret = 0;
32052  PyObject *object_reduce = NULL;
32053  PyObject *object_reduce_ex = NULL;
32054  PyObject *reduce = NULL;
32055  PyObject *reduce_ex = NULL;
32056  PyObject *reduce_cython = NULL;
32057  PyObject *setstate = NULL;
32058  PyObject *setstate_cython = NULL;
32059 #if CYTHON_USE_PYTYPE_LOOKUP
32060  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
32061 #else
32062  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
32063 #endif
32064 #if CYTHON_USE_PYTYPE_LOOKUP
32065  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
32066 #else
32067  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
32068 #endif
32069  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
32070  if (reduce_ex == object_reduce_ex) {
32071 #if CYTHON_USE_PYTYPE_LOOKUP
32072  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
32073 #else
32074  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
32075 #endif
32076  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
32077  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
32078  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
32079  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
32080  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
32081  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
32082  if (!setstate) PyErr_Clear();
32083  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
32084  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
32085  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
32086  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
32087  }
32088  PyType_Modified((PyTypeObject*)type_obj);
32089  }
32090  }
32091  goto GOOD;
32092 BAD:
32093  if (!PyErr_Occurred())
32094  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
32095  ret = -1;
32096 GOOD:
32097 #if !CYTHON_USE_PYTYPE_LOOKUP
32098  Py_XDECREF(object_reduce);
32099  Py_XDECREF(object_reduce_ex);
32100 #endif
32101  Py_XDECREF(reduce);
32102  Py_XDECREF(reduce_ex);
32103  Py_XDECREF(reduce_cython);
32104  Py_XDECREF(setstate);
32105  Py_XDECREF(setstate_cython);
32106  return ret;
32107 }
32108 
32109 /* TypeImport */
32110 #ifndef __PYX_HAVE_RT_ImportType
32111 #define __PYX_HAVE_RT_ImportType
32112 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
32113  size_t size, enum __Pyx_ImportType_CheckSize check_size)
32114 {
32115  PyObject *result = 0;
32116  char warning[200];
32117  Py_ssize_t basicsize;
32118 #ifdef Py_LIMITED_API
32119  PyObject *py_basicsize;
32120 #endif
32121  result = PyObject_GetAttrString(module, class_name);
32122  if (!result)
32123  goto bad;
32124  if (!PyType_Check(result)) {
32125  PyErr_Format(PyExc_TypeError,
32126  "%.200s.%.200s is not a type object",
32127  module_name, class_name);
32128  goto bad;
32129  }
32130 #ifndef Py_LIMITED_API
32131  basicsize = ((PyTypeObject *)result)->tp_basicsize;
32132 #else
32133  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
32134  if (!py_basicsize)
32135  goto bad;
32136  basicsize = PyLong_AsSsize_t(py_basicsize);
32137  Py_DECREF(py_basicsize);
32138  py_basicsize = 0;
32139  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
32140  goto bad;
32141 #endif
32142  if ((size_t)basicsize < size) {
32143  PyErr_Format(PyExc_ValueError,
32144  "%.200s.%.200s size changed, may indicate binary incompatibility. "
32145  "Expected %zd from C header, got %zd from PyObject",
32146  module_name, class_name, size, basicsize);
32147  goto bad;
32148  }
32149  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
32150  PyErr_Format(PyExc_ValueError,
32151  "%.200s.%.200s size changed, may indicate binary incompatibility. "
32152  "Expected %zd from C header, got %zd from PyObject",
32153  module_name, class_name, size, basicsize);
32154  goto bad;
32155  }
32156  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
32157  PyOS_snprintf(warning, sizeof(warning),
32158  "%s.%s size changed, may indicate binary incompatibility. "
32159  "Expected %zd from C header, got %zd from PyObject",
32160  module_name, class_name, size, basicsize);
32161  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
32162  }
32163  return (PyTypeObject *)result;
32164 bad:
32165  Py_XDECREF(result);
32166  return NULL;
32167 }
32168 #endif
32169 
32170 /* CalculateMetaclass */
32171 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
32172  Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
32173  for (i=0; i < nbases; i++) {
32174  PyTypeObject *tmptype;
32175  PyObject *tmp = PyTuple_GET_ITEM(bases, i);
32176  tmptype = Py_TYPE(tmp);
32177 #if PY_MAJOR_VERSION < 3
32178  if (tmptype == &PyClass_Type)
32179  continue;
32180 #endif
32181  if (!metaclass) {
32182  metaclass = tmptype;
32183  continue;
32184  }
32185  if (PyType_IsSubtype(metaclass, tmptype))
32186  continue;
32187  if (PyType_IsSubtype(tmptype, metaclass)) {
32188  metaclass = tmptype;
32189  continue;
32190  }
32191  PyErr_SetString(PyExc_TypeError,
32192  "metaclass conflict: "
32193  "the metaclass of a derived class "
32194  "must be a (non-strict) subclass "
32195  "of the metaclasses of all its bases");
32196  return NULL;
32197  }
32198  if (!metaclass) {
32199 #if PY_MAJOR_VERSION < 3
32200  metaclass = &PyClass_Type;
32201 #else
32202  metaclass = &PyType_Type;
32203 #endif
32204  }
32205  Py_INCREF((PyObject*) metaclass);
32206  return (PyObject*) metaclass;
32207 }
32208 
32209 /* FetchCommonType */
32210 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
32211  PyObject* fake_module;
32212  PyTypeObject* cached_type = NULL;
32213  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
32214  if (!fake_module) return NULL;
32215  Py_INCREF(fake_module);
32216  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
32217  if (cached_type) {
32218  if (!PyType_Check((PyObject*)cached_type)) {
32219  PyErr_Format(PyExc_TypeError,
32220  "Shared Cython type %.200s is not a type object",
32221  type->tp_name);
32222  goto bad;
32223  }
32224  if (cached_type->tp_basicsize != type->tp_basicsize) {
32225  PyErr_Format(PyExc_TypeError,
32226  "Shared Cython type %.200s has the wrong size, try recompiling",
32227  type->tp_name);
32228  goto bad;
32229  }
32230  } else {
32231  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
32232  PyErr_Clear();
32233  if (PyType_Ready(type) < 0) goto bad;
32234  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
32235  goto bad;
32236  Py_INCREF(type);
32237  cached_type = type;
32238  }
32239 done:
32240  Py_DECREF(fake_module);
32241  return cached_type;
32242 bad:
32243  Py_XDECREF(cached_type);
32244  cached_type = NULL;
32245  goto done;
32246 }
32247 
32248 /* CythonFunction */
32249 #include <structmember.h>
32250 static PyObject *
32251 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
32252 {
32253  if (unlikely(op->func_doc == NULL)) {
32254  if (op->func.m_ml->ml_doc) {
32255 #if PY_MAJOR_VERSION >= 3
32256  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
32257 #else
32258  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
32259 #endif
32260  if (unlikely(op->func_doc == NULL))
32261  return NULL;
32262  } else {
32263  Py_INCREF(Py_None);
32264  return Py_None;
32265  }
32266  }
32267  Py_INCREF(op->func_doc);
32268  return op->func_doc;
32269 }
32270 static int
32271 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
32272 {
32273  PyObject *tmp = op->func_doc;
32274  if (value == NULL) {
32275  value = Py_None;
32276  }
32277  Py_INCREF(value);
32278  op->func_doc = value;
32279  Py_XDECREF(tmp);
32280  return 0;
32281 }
32282 static PyObject *
32283 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
32284 {
32285  if (unlikely(op->func_name == NULL)) {
32286 #if PY_MAJOR_VERSION >= 3
32287  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
32288 #else
32289  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
32290 #endif
32291  if (unlikely(op->func_name == NULL))
32292  return NULL;
32293  }
32294  Py_INCREF(op->func_name);
32295  return op->func_name;
32296 }
32297 static int
32298 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
32299 {
32300  PyObject *tmp;
32301 #if PY_MAJOR_VERSION >= 3
32302  if (unlikely(value == NULL || !PyUnicode_Check(value)))
32303 #else
32304  if (unlikely(value == NULL || !PyString_Check(value)))
32305 #endif
32306  {
32307  PyErr_SetString(PyExc_TypeError,
32308  "__name__ must be set to a string object");
32309  return -1;
32310  }
32311  tmp = op->func_name;
32312  Py_INCREF(value);
32313  op->func_name = value;
32314  Py_XDECREF(tmp);
32315  return 0;
32316 }
32317 static PyObject *
32318 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
32319 {
32320  Py_INCREF(op->func_qualname);
32321  return op->func_qualname;
32322 }
32323 static int
32324 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
32325 {
32326  PyObject *tmp;
32327 #if PY_MAJOR_VERSION >= 3
32328  if (unlikely(value == NULL || !PyUnicode_Check(value)))
32329 #else
32330  if (unlikely(value == NULL || !PyString_Check(value)))
32331 #endif
32332  {
32333  PyErr_SetString(PyExc_TypeError,
32334  "__qualname__ must be set to a string object");
32335  return -1;
32336  }
32337  tmp = op->func_qualname;
32338  Py_INCREF(value);
32339  op->func_qualname = value;
32340  Py_XDECREF(tmp);
32341  return 0;
32342 }
32343 static PyObject *
32344 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
32345 {
32346  PyObject *self;
32347  self = m->func_closure;
32348  if (self == NULL)
32349  self = Py_None;
32350  Py_INCREF(self);
32351  return self;
32352 }
32353 static PyObject *
32354 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
32355 {
32356  if (unlikely(op->func_dict == NULL)) {
32357  op->func_dict = PyDict_New();
32358  if (unlikely(op->func_dict == NULL))
32359  return NULL;
32360  }
32361  Py_INCREF(op->func_dict);
32362  return op->func_dict;
32363 }
32364 static int
32365 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
32366 {
32367  PyObject *tmp;
32368  if (unlikely(value == NULL)) {
32369  PyErr_SetString(PyExc_TypeError,
32370  "function's dictionary may not be deleted");
32371  return -1;
32372  }
32373  if (unlikely(!PyDict_Check(value))) {
32374  PyErr_SetString(PyExc_TypeError,
32375  "setting function's dictionary to a non-dict");
32376  return -1;
32377  }
32378  tmp = op->func_dict;
32379  Py_INCREF(value);
32380  op->func_dict = value;
32381  Py_XDECREF(tmp);
32382  return 0;
32383 }
32384 static PyObject *
32385 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
32386 {
32387  Py_INCREF(op->func_globals);
32388  return op->func_globals;
32389 }
32390 static PyObject *
32391 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
32392 {
32393  Py_INCREF(Py_None);
32394  return Py_None;
32395 }
32396 static PyObject *
32397 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
32398 {
32399  PyObject* result = (op->func_code) ? op->func_code : Py_None;
32400  Py_INCREF(result);
32401  return result;
32402 }
32403 static int
32404 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
32405  int result = 0;
32406  PyObject *res = op->defaults_getter((PyObject *) op);
32407  if (unlikely(!res))
32408  return -1;
32409  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
32410  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
32411  Py_INCREF(op->defaults_tuple);
32412  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
32413  Py_INCREF(op->defaults_kwdict);
32414  #else
32415  op->defaults_tuple = PySequence_ITEM(res, 0);
32416  if (unlikely(!op->defaults_tuple)) result = -1;
32417  else {
32418  op->defaults_kwdict = PySequence_ITEM(res, 1);
32419  if (unlikely(!op->defaults_kwdict)) result = -1;
32420  }
32421  #endif
32422  Py_DECREF(res);
32423  return result;
32424 }
32425 static int
32426 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
32427  PyObject* tmp;
32428  if (!value) {
32429  value = Py_None;
32430  } else if (value != Py_None && !PyTuple_Check(value)) {
32431  PyErr_SetString(PyExc_TypeError,
32432  "__defaults__ must be set to a tuple object");
32433  return -1;
32434  }
32435  Py_INCREF(value);
32436  tmp = op->defaults_tuple;
32437  op->defaults_tuple = value;
32438  Py_XDECREF(tmp);
32439  return 0;
32440 }
32441 static PyObject *
32442 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
32443  PyObject* result = op->defaults_tuple;
32444  if (unlikely(!result)) {
32445  if (op->defaults_getter) {
32446  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
32447  result = op->defaults_tuple;
32448  } else {
32449  result = Py_None;
32450  }
32451  }
32452  Py_INCREF(result);
32453  return result;
32454 }
32455 static int
32456 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
32457  PyObject* tmp;
32458  if (!value) {
32459  value = Py_None;
32460  } else if (value != Py_None && !PyDict_Check(value)) {
32461  PyErr_SetString(PyExc_TypeError,
32462  "__kwdefaults__ must be set to a dict object");
32463  return -1;
32464  }
32465  Py_INCREF(value);
32466  tmp = op->defaults_kwdict;
32467  op->defaults_kwdict = value;
32468  Py_XDECREF(tmp);
32469  return 0;
32470 }
32471 static PyObject *
32472 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
32473  PyObject* result = op->defaults_kwdict;
32474  if (unlikely(!result)) {
32475  if (op->defaults_getter) {
32476  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
32477  result = op->defaults_kwdict;
32478  } else {
32479  result = Py_None;
32480  }
32481  }
32482  Py_INCREF(result);
32483  return result;
32484 }
32485 static int
32486 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
32487  PyObject* tmp;
32488  if (!value || value == Py_None) {
32489  value = NULL;
32490  } else if (!PyDict_Check(value)) {
32491  PyErr_SetString(PyExc_TypeError,
32492  "__annotations__ must be set to a dict object");
32493  return -1;
32494  }
32495  Py_XINCREF(value);
32496  tmp = op->func_annotations;
32497  op->func_annotations = value;
32498  Py_XDECREF(tmp);
32499  return 0;
32500 }
32501 static PyObject *
32502 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
32503  PyObject* result = op->func_annotations;
32504  if (unlikely(!result)) {
32505  result = PyDict_New();
32506  if (unlikely(!result)) return NULL;
32507  op->func_annotations = result;
32508  }
32509  Py_INCREF(result);
32510  return result;
32511 }
32512 static PyGetSetDef __pyx_CyFunction_getsets[] = {
32513  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
32514  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
32515  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
32516  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
32517  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
32518  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
32519  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
32520  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
32521  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
32522  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
32523  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
32524  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
32525  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
32526  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
32527  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
32528  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
32529  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
32530  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
32531  {0, 0, 0, 0, 0}
32532 };
32533 static PyMemberDef __pyx_CyFunction_members[] = {
32534  {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
32535  {0, 0, 0, 0, 0}
32536 };
32537 static PyObject *
32538 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
32539 {
32540 #if PY_MAJOR_VERSION >= 3
32541  return PyUnicode_FromString(m->func.m_ml->ml_name);
32542 #else
32543  return PyString_FromString(m->func.m_ml->ml_name);
32544 #endif
32545 }
32546 static PyMethodDef __pyx_CyFunction_methods[] = {
32547  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
32548  {0, 0, 0, 0}
32549 };
32550 #if PY_VERSION_HEX < 0x030500A0
32551 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
32552 #else
32553 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
32554 #endif
32555 static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
32556  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
32557  __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
32558  if (op == NULL)
32559  return NULL;
32560  op->flags = flags;
32561  __Pyx_CyFunction_weakreflist(op) = NULL;
32562  op->func.m_ml = ml;
32563  op->func.m_self = (PyObject *) op;
32564  Py_XINCREF(closure);
32565  op->func_closure = closure;
32566  Py_XINCREF(module);
32567  op->func.m_module = module;
32568  op->func_dict = NULL;
32569  op->func_name = NULL;
32570  Py_INCREF(qualname);
32571  op->func_qualname = qualname;
32572  op->func_doc = NULL;
32573  op->func_classobj = NULL;
32574  op->func_globals = globals;
32575  Py_INCREF(op->func_globals);
32576  Py_XINCREF(code);
32577  op->func_code = code;
32578  op->defaults_pyobjects = 0;
32579  op->defaults = NULL;
32580  op->defaults_tuple = NULL;
32581  op->defaults_kwdict = NULL;
32582  op->defaults_getter = NULL;
32583  op->func_annotations = NULL;
32584  PyObject_GC_Track(op);
32585  return (PyObject *) op;
32586 }
32587 static int
32588 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
32589 {
32590  Py_CLEAR(m->func_closure);
32591  Py_CLEAR(m->func.m_module);
32592  Py_CLEAR(m->func_dict);
32593  Py_CLEAR(m->func_name);
32594  Py_CLEAR(m->func_qualname);
32595  Py_CLEAR(m->func_doc);
32596  Py_CLEAR(m->func_globals);
32597  Py_CLEAR(m->func_code);
32598  Py_CLEAR(m->func_classobj);
32599  Py_CLEAR(m->defaults_tuple);
32600  Py_CLEAR(m->defaults_kwdict);
32601  Py_CLEAR(m->func_annotations);
32602  if (m->defaults) {
32603  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
32604  int i;
32605  for (i = 0; i < m->defaults_pyobjects; i++)
32606  Py_XDECREF(pydefaults[i]);
32607  PyObject_Free(m->defaults);
32608  m->defaults = NULL;
32609  }
32610  return 0;
32611 }
32612 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
32613 {
32614  if (__Pyx_CyFunction_weakreflist(m) != NULL)
32615  PyObject_ClearWeakRefs((PyObject *) m);
32616  __Pyx_CyFunction_clear(m);
32617  PyObject_GC_Del(m);
32618 }
32619 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
32620 {
32621  PyObject_GC_UnTrack(m);
32622  __Pyx__CyFunction_dealloc(m);
32623 }
32624 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
32625 {
32626  Py_VISIT(m->func_closure);
32627  Py_VISIT(m->func.m_module);
32628  Py_VISIT(m->func_dict);
32629  Py_VISIT(m->func_name);
32630  Py_VISIT(m->func_qualname);
32631  Py_VISIT(m->func_doc);
32632  Py_VISIT(m->func_globals);
32633  Py_VISIT(m->func_code);
32634  Py_VISIT(m->func_classobj);
32635  Py_VISIT(m->defaults_tuple);
32636  Py_VISIT(m->defaults_kwdict);
32637  if (m->defaults) {
32638  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
32639  int i;
32640  for (i = 0; i < m->defaults_pyobjects; i++)
32641  Py_VISIT(pydefaults[i]);
32642  }
32643  return 0;
32644 }
32645 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
32646 {
32647  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
32648  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
32649  Py_INCREF(func);
32650  return func;
32651  }
32652  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
32653  if (type == NULL)
32654  type = (PyObject *)(Py_TYPE(obj));
32655  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
32656  }
32657  if (obj == Py_None)
32658  obj = NULL;
32659  return __Pyx_PyMethod_New(func, obj, type);
32660 }
32661 static PyObject*
32662 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
32663 {
32664 #if PY_MAJOR_VERSION >= 3
32665  return PyUnicode_FromFormat("<cyfunction %U at %p>",
32666  op->func_qualname, (void *)op);
32667 #else
32668  return PyString_FromFormat("<cyfunction %s at %p>",
32669  PyString_AsString(op->func_qualname), (void *)op);
32670 #endif
32671 }
32672 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
32673  PyCFunctionObject* f = (PyCFunctionObject*)func;
32674  PyCFunction meth = f->m_ml->ml_meth;
32675  Py_ssize_t size;
32676  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
32677  case METH_VARARGS:
32678  if (likely(kw == NULL || PyDict_Size(kw) == 0))
32679  return (*meth)(self, arg);
32680  break;
32681  case METH_VARARGS | METH_KEYWORDS:
32682  return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
32683  case METH_NOARGS:
32684  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
32685  size = PyTuple_GET_SIZE(arg);
32686  if (likely(size == 0))
32687  return (*meth)(self, NULL);
32688  PyErr_Format(PyExc_TypeError,
32689  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
32690  f->m_ml->ml_name, size);
32691  return NULL;
32692  }
32693  break;
32694  case METH_O:
32695  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
32696  size = PyTuple_GET_SIZE(arg);
32697  if (likely(size == 1)) {
32698  PyObject *result, *arg0;
32699  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
32700  arg0 = PyTuple_GET_ITEM(arg, 0);
32701  #else
32702  arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
32703  #endif
32704  result = (*meth)(self, arg0);
32705  #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
32706  Py_DECREF(arg0);
32707  #endif
32708  return result;
32709  }
32710  PyErr_Format(PyExc_TypeError,
32711  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
32712  f->m_ml->ml_name, size);
32713  return NULL;
32714  }
32715  break;
32716  default:
32717  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
32718  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
32719  "longer supported!");
32720  return NULL;
32721  }
32722  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
32723  f->m_ml->ml_name);
32724  return NULL;
32725 }
32726 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
32727  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
32728 }
32729 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
32730  PyObject *result;
32731  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
32732  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
32733  Py_ssize_t argc;
32734  PyObject *new_args;
32735  PyObject *self;
32736  argc = PyTuple_GET_SIZE(args);
32737  new_args = PyTuple_GetSlice(args, 1, argc);
32738  if (unlikely(!new_args))
32739  return NULL;
32740  self = PyTuple_GetItem(args, 0);
32741  if (unlikely(!self)) {
32742  Py_DECREF(new_args);
32743  return NULL;
32744  }
32745  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
32746  Py_DECREF(new_args);
32747  } else {
32748  result = __Pyx_CyFunction_Call(func, args, kw);
32749  }
32750  return result;
32751 }
32752 static PyTypeObject __pyx_CyFunctionType_type = {
32753  PyVarObject_HEAD_INIT(0, 0)
32754  "cython_function_or_method",
32755  sizeof(__pyx_CyFunctionObject),
32756  0,
32757  (destructor) __Pyx_CyFunction_dealloc,
32758  0,
32759  0,
32760  0,
32761 #if PY_MAJOR_VERSION < 3
32762  0,
32763 #else
32764  0,
32765 #endif
32766  (reprfunc) __Pyx_CyFunction_repr,
32767  0,
32768  0,
32769  0,
32770  0,
32771  __Pyx_CyFunction_CallAsMethod,
32772  0,
32773  0,
32774  0,
32775  0,
32776  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
32777  0,
32778  (traverseproc) __Pyx_CyFunction_traverse,
32779  (inquiry) __Pyx_CyFunction_clear,
32780  0,
32781 #if PY_VERSION_HEX < 0x030500A0
32782  offsetof(__pyx_CyFunctionObject, func_weakreflist),
32783 #else
32784  offsetof(PyCFunctionObject, m_weakreflist),
32785 #endif
32786  0,
32787  0,
32788  __pyx_CyFunction_methods,
32789  __pyx_CyFunction_members,
32790  __pyx_CyFunction_getsets,
32791  0,
32792  0,
32793  __Pyx_CyFunction_descr_get,
32794  0,
32795  offsetof(__pyx_CyFunctionObject, func_dict),
32796  0,
32797  0,
32798  0,
32799  0,
32800  0,
32801  0,
32802  0,
32803  0,
32804  0,
32805  0,
32806  0,
32807  0,
32808 #if PY_VERSION_HEX >= 0x030400a1
32809  0,
32810 #endif
32811 };
32812 static int __pyx_CyFunction_init(void) {
32813  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
32814  if (unlikely(__pyx_CyFunctionType == NULL)) {
32815  return -1;
32816  }
32817  return 0;
32818 }
32819 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
32820  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
32821  m->defaults = PyObject_Malloc(size);
32822  if (unlikely(!m->defaults))
32823  return PyErr_NoMemory();
32824  memset(m->defaults, 0, size);
32825  m->defaults_pyobjects = pyobjects;
32826  return m->defaults;
32827 }
32828 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
32829  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
32830  m->defaults_tuple = tuple;
32831  Py_INCREF(tuple);
32832 }
32833 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
32834  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
32835  m->defaults_kwdict = dict;
32836  Py_INCREF(dict);
32837 }
32838 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
32839  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
32840  m->func_annotations = dict;
32841  Py_INCREF(dict);
32842 }
32843 
32844 /* Py3ClassCreate */
32845 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
32846  PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
32847  PyObject *ns;
32848  if (metaclass) {
32849  PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
32850  if (prep) {
32851  PyObject *pargs = PyTuple_Pack(2, name, bases);
32852  if (unlikely(!pargs)) {
32853  Py_DECREF(prep);
32854  return NULL;
32855  }
32856  ns = PyObject_Call(prep, pargs, mkw);
32857  Py_DECREF(prep);
32858  Py_DECREF(pargs);
32859  } else {
32860  if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
32861  return NULL;
32862  PyErr_Clear();
32863  ns = PyDict_New();
32864  }
32865  } else {
32866  ns = PyDict_New();
32867  }
32868  if (unlikely(!ns))
32869  return NULL;
32870  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
32871  if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
32872  if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
32873  return ns;
32874 bad:
32875  Py_DECREF(ns);
32876  return NULL;
32877 }
32878 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
32879  PyObject *dict, PyObject *mkw,
32880  int calculate_metaclass, int allow_py2_metaclass) {
32881  PyObject *result, *margs;
32882  PyObject *owned_metaclass = NULL;
32883  if (allow_py2_metaclass) {
32884  owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
32885  if (owned_metaclass) {
32886  metaclass = owned_metaclass;
32887  } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
32888  PyErr_Clear();
32889  } else {
32890  return NULL;
32891  }
32892  }
32893  if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
32894  metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
32895  Py_XDECREF(owned_metaclass);
32896  if (unlikely(!metaclass))
32897  return NULL;
32898  owned_metaclass = metaclass;
32899  }
32900  margs = PyTuple_Pack(3, name, bases, dict);
32901  if (unlikely(!margs)) {
32902  result = NULL;
32903  } else {
32904  result = PyObject_Call(metaclass, margs, mkw);
32905  Py_DECREF(margs);
32906  }
32907  Py_XDECREF(owned_metaclass);
32908  return result;
32909 }
32910 
32911 /* CLineInTraceback */
32912 #ifndef CYTHON_CLINE_IN_TRACEBACK
32913 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
32914  PyObject *use_cline;
32915  PyObject *ptype, *pvalue, *ptraceback;
32916 #if CYTHON_COMPILING_IN_CPYTHON
32917  PyObject **cython_runtime_dict;
32918 #endif
32919  if (unlikely(!__pyx_cython_runtime)) {
32920  return c_line;
32921  }
32922  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
32923 #if CYTHON_COMPILING_IN_CPYTHON
32924  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
32925  if (likely(cython_runtime_dict)) {
32926  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
32927  use_cline, *cython_runtime_dict,
32928  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
32929  } else
32930 #endif
32931  {
32932  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
32933  if (use_cline_obj) {
32934  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
32935  Py_DECREF(use_cline_obj);
32936  } else {
32937  PyErr_Clear();
32938  use_cline = NULL;
32939  }
32940  }
32941  if (!use_cline) {
32942  c_line = 0;
32943  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
32944  }
32945  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
32946  c_line = 0;
32947  }
32948  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
32949  return c_line;
32950 }
32951 #endif
32952 
32953 /* CodeObjectCache */
32954 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
32955  int start = 0, mid = 0, end = count - 1;
32956  if (end >= 0 && code_line > entries[end].code_line) {
32957  return count;
32958  }
32959  while (start < end) {
32960  mid = start + (end - start) / 2;
32961  if (code_line < entries[mid].code_line) {
32962  end = mid;
32963  } else if (code_line > entries[mid].code_line) {
32964  start = mid + 1;
32965  } else {
32966  return mid;
32967  }
32968  }
32969  if (code_line <= entries[mid].code_line) {
32970  return mid;
32971  } else {
32972  return mid + 1;
32973  }
32974 }
32975 static PyCodeObject *__pyx_find_code_object(int code_line) {
32976  PyCodeObject* code_object;
32977  int pos;
32978  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
32979  return NULL;
32980  }
32981  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
32982  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
32983  return NULL;
32984  }
32985  code_object = __pyx_code_cache.entries[pos].code_object;
32986  Py_INCREF(code_object);
32987  return code_object;
32988 }
32989 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
32990  int pos, i;
32991  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
32992  if (unlikely(!code_line)) {
32993  return;
32994  }
32995  if (unlikely(!entries)) {
32996  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
32997  if (likely(entries)) {
32998  __pyx_code_cache.entries = entries;
32999  __pyx_code_cache.max_count = 64;
33000  __pyx_code_cache.count = 1;
33001  entries[0].code_line = code_line;
33002  entries[0].code_object = code_object;
33003  Py_INCREF(code_object);
33004  }
33005  return;
33006  }
33007  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
33008  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
33009  PyCodeObject* tmp = entries[pos].code_object;
33010  entries[pos].code_object = code_object;
33011  Py_DECREF(tmp);
33012  return;
33013  }
33014  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
33015  int new_max = __pyx_code_cache.max_count + 64;
33016  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
33017  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
33018  if (unlikely(!entries)) {
33019  return;
33020  }
33021  __pyx_code_cache.entries = entries;
33022  __pyx_code_cache.max_count = new_max;
33023  }
33024  for (i=__pyx_code_cache.count; i>pos; i--) {
33025  entries[i] = entries[i-1];
33026  }
33027  entries[pos].code_line = code_line;
33028  entries[pos].code_object = code_object;
33029  __pyx_code_cache.count++;
33030  Py_INCREF(code_object);
33031 }
33032 
33033 /* AddTraceback */
33034 #include "compile.h"
33035 #include "frameobject.h"
33036 #include "traceback.h"
33037 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
33038  const char *funcname, int c_line,
33039  int py_line, const char *filename) {
33040  PyCodeObject *py_code = 0;
33041  PyObject *py_srcfile = 0;
33042  PyObject *py_funcname = 0;
33043  #if PY_MAJOR_VERSION < 3
33044  py_srcfile = PyString_FromString(filename);
33045  #else
33046  py_srcfile = PyUnicode_FromString(filename);
33047  #endif
33048  if (!py_srcfile) goto bad;
33049  if (c_line) {
33050  #if PY_MAJOR_VERSION < 3
33051  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
33052  #else
33053  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
33054  #endif
33055  }
33056  else {
33057  #if PY_MAJOR_VERSION < 3
33058  py_funcname = PyString_FromString(funcname);
33059  #else
33060  py_funcname = PyUnicode_FromString(funcname);
33061  #endif
33062  }
33063  if (!py_funcname) goto bad;
33064  py_code = __Pyx_PyCode_New(
33065  0,
33066  0,
33067  0,
33068  0,
33069  0,
33070  __pyx_empty_bytes, /*PyObject *code,*/
33071  __pyx_empty_tuple, /*PyObject *consts,*/
33072  __pyx_empty_tuple, /*PyObject *names,*/
33073  __pyx_empty_tuple, /*PyObject *varnames,*/
33074  __pyx_empty_tuple, /*PyObject *freevars,*/
33075  __pyx_empty_tuple, /*PyObject *cellvars,*/
33076  py_srcfile, /*PyObject *filename,*/
33077  py_funcname, /*PyObject *name,*/
33078  py_line,
33079  __pyx_empty_bytes /*PyObject *lnotab*/
33080  );
33081  Py_DECREF(py_srcfile);
33082  Py_DECREF(py_funcname);
33083  return py_code;
33084 bad:
33085  Py_XDECREF(py_srcfile);
33086  Py_XDECREF(py_funcname);
33087  return NULL;
33088 }
33089 static void __Pyx_AddTraceback(const char *funcname, int c_line,
33090  int py_line, const char *filename) {
33091  PyCodeObject *py_code = 0;
33092  PyFrameObject *py_frame = 0;
33093  PyThreadState *tstate = __Pyx_PyThreadState_Current;
33094  if (c_line) {
33095  c_line = __Pyx_CLineForTraceback(tstate, c_line);
33096  }
33097  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
33098  if (!py_code) {
33099  py_code = __Pyx_CreateCodeObjectForTraceback(
33100  funcname, c_line, py_line, filename);
33101  if (!py_code) goto bad;
33102  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
33103  }
33104  py_frame = PyFrame_New(
33105  tstate, /*PyThreadState *tstate,*/
33106  py_code, /*PyCodeObject *code,*/
33107  __pyx_d, /*PyObject *globals,*/
33108  0 /*PyObject *locals*/
33109  );
33110  if (!py_frame) goto bad;
33111  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
33112  PyTraceBack_Here(py_frame);
33113 bad:
33114  Py_XDECREF(py_code);
33115  Py_XDECREF(py_frame);
33116 }
33117 
33118 /* CIntFromPyVerify */
33119 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
33120  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
33121 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
33122  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
33123 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
33124  {\
33125  func_type value = func_value;\
33126  if (sizeof(target_type) < sizeof(func_type)) {\
33127  if (unlikely(value != (func_type) (target_type) value)) {\
33128  func_type zero = 0;\
33129  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
33130  return (target_type) -1;\
33131  if (is_unsigned && unlikely(value < zero))\
33132  goto raise_neg_overflow;\
33133  else\
33134  goto raise_overflow;\
33135  }\
33136  }\
33137  return (target_type) value;\
33138  }
33139 
33140 /* CIntToPy */
33141 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
33142  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
33143  const int is_unsigned = neg_one > const_zero;
33144  if (is_unsigned) {
33145  if (sizeof(long) < sizeof(long)) {
33146  return PyInt_FromLong((long) value);
33147  } else if (sizeof(long) <= sizeof(unsigned long)) {
33148  return PyLong_FromUnsignedLong((unsigned long) value);
33149 #ifdef HAVE_LONG_LONG
33150  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
33151  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
33152 #endif
33153  }
33154  } else {
33155  if (sizeof(long) <= sizeof(long)) {
33156  return PyInt_FromLong((long) value);
33157 #ifdef HAVE_LONG_LONG
33158  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
33159  return PyLong_FromLongLong((PY_LONG_LONG) value);
33160 #endif
33161  }
33162  }
33163  {
33164  int one = 1; int little = (int)*(unsigned char *)&one;
33165  unsigned char *bytes = (unsigned char *)&value;
33166  return _PyLong_FromByteArray(bytes, sizeof(long),
33167  little, !is_unsigned);
33168  }
33169 }
33170 
33171 /* Declarations */
33172 #if CYTHON_CCOMPLEX
33173  #ifdef __cplusplus
33174  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33175  return ::std::complex< float >(x, y);
33176  }
33177  #else
33178  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33179  return x + y*(__pyx_t_float_complex)_Complex_I;
33180  }
33181  #endif
33182 #else
33183  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
33184  __pyx_t_float_complex z;
33185  z.real = x;
33186  z.imag = y;
33187  return z;
33188  }
33189 #endif
33190 
33191 /* Arithmetic */
33192 #if CYTHON_CCOMPLEX
33193 #else
33194  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33195  return (a.real == b.real) && (a.imag == b.imag);
33196  }
33197  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33198  __pyx_t_float_complex z;
33199  z.real = a.real + b.real;
33200  z.imag = a.imag + b.imag;
33201  return z;
33202  }
33203  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33204  __pyx_t_float_complex z;
33205  z.real = a.real - b.real;
33206  z.imag = a.imag - b.imag;
33207  return z;
33208  }
33209  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33210  __pyx_t_float_complex z;
33211  z.real = a.real * b.real - a.imag * b.imag;
33212  z.imag = a.real * b.imag + a.imag * b.real;
33213  return z;
33214  }
33215  #if 1
33216  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33217  if (b.imag == 0) {
33218  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
33219  } else if (fabsf(b.real) >= fabsf(b.imag)) {
33220  if (b.real == 0 && b.imag == 0) {
33221  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
33222  } else {
33223  float r = b.imag / b.real;
33224  float s = 1.0 / (b.real + b.imag * r);
33225  return __pyx_t_float_complex_from_parts(
33226  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
33227  }
33228  } else {
33229  float r = b.real / b.imag;
33230  float s = 1.0 / (b.imag + b.real * r);
33231  return __pyx_t_float_complex_from_parts(
33232  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
33233  }
33234  }
33235  #else
33236  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33237  if (b.imag == 0) {
33238  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
33239  } else {
33240  float denom = b.real * b.real + b.imag * b.imag;
33241  return __pyx_t_float_complex_from_parts(
33242  (a.real * b.real + a.imag * b.imag) / denom,
33243  (a.imag * b.real - a.real * b.imag) / denom);
33244  }
33245  }
33246  #endif
33247  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
33248  __pyx_t_float_complex z;
33249  z.real = -a.real;
33250  z.imag = -a.imag;
33251  return z;
33252  }
33253  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
33254  return (a.real == 0) && (a.imag == 0);
33255  }
33256  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
33257  __pyx_t_float_complex z;
33258  z.real = a.real;
33259  z.imag = -a.imag;
33260  return z;
33261  }
33262  #if 1
33263  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
33264  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
33265  return sqrtf(z.real*z.real + z.imag*z.imag);
33266  #else
33267  return hypotf(z.real, z.imag);
33268  #endif
33269  }
33270  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
33271  __pyx_t_float_complex z;
33272  float r, lnr, theta, z_r, z_theta;
33273  if (b.imag == 0 && b.real == (int)b.real) {
33274  if (b.real < 0) {
33275  float denom = a.real * a.real + a.imag * a.imag;
33276  a.real = a.real / denom;
33277  a.imag = -a.imag / denom;
33278  b.real = -b.real;
33279  }
33280  switch ((int)b.real) {
33281  case 0:
33282  z.real = 1;
33283  z.imag = 0;
33284  return z;
33285  case 1:
33286  return a;
33287  case 2:
33288  z = __Pyx_c_prod_float(a, a);
33289  return __Pyx_c_prod_float(a, a);
33290  case 3:
33291  z = __Pyx_c_prod_float(a, a);
33292  return __Pyx_c_prod_float(z, a);
33293  case 4:
33294  z = __Pyx_c_prod_float(a, a);
33295  return __Pyx_c_prod_float(z, z);
33296  }
33297  }
33298  if (a.imag == 0) {
33299  if (a.real == 0) {
33300  return a;
33301  } else if (b.imag == 0) {
33302  z.real = powf(a.real, b.real);
33303  z.imag = 0;
33304  return z;
33305  } else if (a.real > 0) {
33306  r = a.real;
33307  theta = 0;
33308  } else {
33309  r = -a.real;
33310  theta = atan2f(0, -1);
33311  }
33312  } else {
33313  r = __Pyx_c_abs_float(a);
33314  theta = atan2f(a.imag, a.real);
33315  }
33316  lnr = logf(r);
33317  z_r = expf(lnr * b.real - theta * b.imag);
33318  z_theta = theta * b.real + lnr * b.imag;
33319  z.real = z_r * cosf(z_theta);
33320  z.imag = z_r * sinf(z_theta);
33321  return z;
33322  }
33323  #endif
33324 #endif
33325 
33326 /* Declarations */
33327 #if CYTHON_CCOMPLEX
33328  #ifdef __cplusplus
33329  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
33330  return ::std::complex< double >(x, y);
33331  }
33332  #else
33333  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
33334  return x + y*(__pyx_t_double_complex)_Complex_I;
33335  }
33336  #endif
33337 #else
33338  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
33339  __pyx_t_double_complex z;
33340  z.real = x;
33341  z.imag = y;
33342  return z;
33343  }
33344 #endif
33345 
33346 /* Arithmetic */
33347 #if CYTHON_CCOMPLEX
33348 #else
33349  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
33350  return (a.real == b.real) && (a.imag == b.imag);
33351  }
33352  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
33353  __pyx_t_double_complex z;
33354  z.real = a.real + b.real;
33355  z.imag = a.imag + b.imag;
33356  return z;
33357  }
33358  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
33359  __pyx_t_double_complex z;
33360  z.real = a.real - b.real;
33361  z.imag = a.imag - b.imag;
33362  return z;
33363  }
33364  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
33365  __pyx_t_double_complex z;
33366  z.real = a.real * b.real - a.imag * b.imag;
33367  z.imag = a.real * b.imag + a.imag * b.real;
33368  return z;
33369  }
33370  #if 1
33371  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
33372  if (b.imag == 0) {
33373  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
33374  } else if (fabs(b.real) >= fabs(b.imag)) {
33375  if (b.real == 0 && b.imag == 0) {
33376  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
33377  } else {
33378  double r = b.imag / b.real;
33379  double s = 1.0 / (b.real + b.imag * r);
33380  return __pyx_t_double_complex_from_parts(
33381  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
33382  }
33383  } else {
33384  double r = b.real / b.imag;
33385  double s = 1.0 / (b.imag + b.real * r);
33386  return __pyx_t_double_complex_from_parts(
33387  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
33388  }
33389  }
33390  #else
33391  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
33392  if (b.imag == 0) {
33393  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
33394  } else {
33395  double denom = b.real * b.real + b.imag * b.imag;
33396  return __pyx_t_double_complex_from_parts(
33397  (a.real * b.real + a.imag * b.imag) / denom,
33398  (a.imag * b.real - a.real * b.imag) / denom);
33399  }
33400  }
33401  #endif
33402  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
33403  __pyx_t_double_complex z;
33404  z.real = -a.real;
33405  z.imag = -a.imag;
33406  return z;
33407  }
33408  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
33409  return (a.real == 0) && (a.imag == 0);
33410  }
33411  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
33412  __pyx_t_double_complex z;
33413  z.real = a.real;
33414  z.imag = -a.imag;
33415  return z;
33416  }
33417  #if 1
33418  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
33419  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
33420  return sqrt(z.real*z.real + z.imag*z.imag);
33421  #else
33422  return hypot(z.real, z.imag);
33423  #endif
33424  }
33425  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
33426  __pyx_t_double_complex z;
33427  double r, lnr, theta, z_r, z_theta;
33428  if (b.imag == 0 && b.real == (int)b.real) {
33429  if (b.real < 0) {
33430  double denom = a.real * a.real + a.imag * a.imag;
33431  a.real = a.real / denom;
33432  a.imag = -a.imag / denom;
33433  b.real = -b.real;
33434  }
33435  switch ((int)b.real) {
33436  case 0:
33437  z.real = 1;
33438  z.imag = 0;
33439  return z;
33440  case 1:
33441  return a;
33442  case 2:
33443  z = __Pyx_c_prod_double(a, a);
33444  return __Pyx_c_prod_double(a, a);
33445  case 3:
33446  z = __Pyx_c_prod_double(a, a);
33447  return __Pyx_c_prod_double(z, a);
33448  case 4:
33449  z = __Pyx_c_prod_double(a, a);
33450  return __Pyx_c_prod_double(z, z);
33451  }
33452  }
33453  if (a.imag == 0) {
33454  if (a.real == 0) {
33455  return a;
33456  } else if (b.imag == 0) {
33457  z.real = pow(a.real, b.real);
33458  z.imag = 0;
33459  return z;
33460  } else if (a.real > 0) {
33461  r = a.real;
33462  theta = 0;
33463  } else {
33464  r = -a.real;
33465  theta = atan2(0, -1);
33466  }
33467  } else {
33468  r = __Pyx_c_abs_double(a);
33469  theta = atan2(a.imag, a.real);
33470  }
33471  lnr = log(r);
33472  z_r = exp(lnr * b.real - theta * b.imag);
33473  z_theta = theta * b.real + lnr * b.imag;
33474  z.real = z_r * cos(z_theta);
33475  z.imag = z_r * sin(z_theta);
33476  return z;
33477  }
33478  #endif
33479 #endif
33480 
33481 /* CIntToPy */
33482 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
33483  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
33484  const int is_unsigned = neg_one > const_zero;
33485  if (is_unsigned) {
33486  if (sizeof(int) < sizeof(long)) {
33487  return PyInt_FromLong((long) value);
33488  } else if (sizeof(int) <= sizeof(unsigned long)) {
33489  return PyLong_FromUnsignedLong((unsigned long) value);
33490 #ifdef HAVE_LONG_LONG
33491  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
33492  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
33493 #endif
33494  }
33495  } else {
33496  if (sizeof(int) <= sizeof(long)) {
33497  return PyInt_FromLong((long) value);
33498 #ifdef HAVE_LONG_LONG
33499  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
33500  return PyLong_FromLongLong((PY_LONG_LONG) value);
33501 #endif
33502  }
33503  }
33504  {
33505  int one = 1; int little = (int)*(unsigned char *)&one;
33506  unsigned char *bytes = (unsigned char *)&value;
33507  return _PyLong_FromByteArray(bytes, sizeof(int),
33508  little, !is_unsigned);
33509  }
33510 }
33511 
33512 /* CIntToPy */
33513 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
33514  const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
33515  const int is_unsigned = neg_one > const_zero;
33516  if (is_unsigned) {
33517  if (sizeof(enum NPY_TYPES) < sizeof(long)) {
33518  return PyInt_FromLong((long) value);
33519  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
33520  return PyLong_FromUnsignedLong((unsigned long) value);
33521 #ifdef HAVE_LONG_LONG
33522  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
33523  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
33524 #endif
33525  }
33526  } else {
33527  if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
33528  return PyInt_FromLong((long) value);
33529 #ifdef HAVE_LONG_LONG
33530  } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
33531  return PyLong_FromLongLong((PY_LONG_LONG) value);
33532 #endif
33533  }
33534  }
33535  {
33536  int one = 1; int little = (int)*(unsigned char *)&one;
33537  unsigned char *bytes = (unsigned char *)&value;
33538  return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
33539  little, !is_unsigned);
33540  }
33541 }
33542 
33543 /* CIntFromPy */
33544 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
33545  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
33546  const int is_unsigned = neg_one > const_zero;
33547 #if PY_MAJOR_VERSION < 3
33548  if (likely(PyInt_Check(x))) {
33549  if (sizeof(int) < sizeof(long)) {
33550  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
33551  } else {
33552  long val = PyInt_AS_LONG(x);
33553  if (is_unsigned && unlikely(val < 0)) {
33554  goto raise_neg_overflow;
33555  }
33556  return (int) val;
33557  }
33558  } else
33559 #endif
33560  if (likely(PyLong_Check(x))) {
33561  if (is_unsigned) {
33562 #if CYTHON_USE_PYLONG_INTERNALS
33563  const digit* digits = ((PyLongObject*)x)->ob_digit;
33564  switch (Py_SIZE(x)) {
33565  case 0: return (int) 0;
33566  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
33567  case 2:
33568  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
33569  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
33570  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33571  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
33572  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
33573  }
33574  }
33575  break;
33576  case 3:
33577  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
33578  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
33579  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33580  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
33581  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
33582  }
33583  }
33584  break;
33585  case 4:
33586  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
33587  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
33588  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33589  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
33590  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
33591  }
33592  }
33593  break;
33594  }
33595 #endif
33596 #if CYTHON_COMPILING_IN_CPYTHON
33597  if (unlikely(Py_SIZE(x) < 0)) {
33598  goto raise_neg_overflow;
33599  }
33600 #else
33601  {
33602  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
33603  if (unlikely(result < 0))
33604  return (int) -1;
33605  if (unlikely(result == 1))
33606  goto raise_neg_overflow;
33607  }
33608 #endif
33609  if (sizeof(int) <= sizeof(unsigned long)) {
33610  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
33611 #ifdef HAVE_LONG_LONG
33612  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
33613  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
33614 #endif
33615  }
33616  } else {
33617 #if CYTHON_USE_PYLONG_INTERNALS
33618  const digit* digits = ((PyLongObject*)x)->ob_digit;
33619  switch (Py_SIZE(x)) {
33620  case 0: return (int) 0;
33621  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
33622  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
33623  case -2:
33624  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
33625  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
33626  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33627  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
33628  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
33629  }
33630  }
33631  break;
33632  case 2:
33633  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
33634  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
33635  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33636  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
33637  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
33638  }
33639  }
33640  break;
33641  case -3:
33642  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
33643  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
33644  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33645  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
33646  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
33647  }
33648  }
33649  break;
33650  case 3:
33651  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
33652  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
33653  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33654  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
33655  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
33656  }
33657  }
33658  break;
33659  case -4:
33660  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
33661  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
33662  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33663  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
33664  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
33665  }
33666  }
33667  break;
33668  case 4:
33669  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
33670  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
33671  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33672  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
33673  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
33674  }
33675  }
33676  break;
33677  }
33678 #endif
33679  if (sizeof(int) <= sizeof(long)) {
33680  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
33681 #ifdef HAVE_LONG_LONG
33682  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
33683  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
33684 #endif
33685  }
33686  }
33687  {
33688 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
33689  PyErr_SetString(PyExc_RuntimeError,
33690  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
33691 #else
33692  int val;
33693  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
33694  #if PY_MAJOR_VERSION < 3
33695  if (likely(v) && !PyLong_Check(v)) {
33696  PyObject *tmp = v;
33697  v = PyNumber_Long(tmp);
33698  Py_DECREF(tmp);
33699  }
33700  #endif
33701  if (likely(v)) {
33702  int one = 1; int is_little = (int)*(unsigned char *)&one;
33703  unsigned char *bytes = (unsigned char *)&val;
33704  int ret = _PyLong_AsByteArray((PyLongObject *)v,
33705  bytes, sizeof(val),
33706  is_little, !is_unsigned);
33707  Py_DECREF(v);
33708  if (likely(!ret))
33709  return val;
33710  }
33711 #endif
33712  return (int) -1;
33713  }
33714  } else {
33715  int val;
33716  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
33717  if (!tmp) return (int) -1;
33718  val = __Pyx_PyInt_As_int(tmp);
33719  Py_DECREF(tmp);
33720  return val;
33721  }
33722 raise_overflow:
33723  PyErr_SetString(PyExc_OverflowError,
33724  "value too large to convert to int");
33725  return (int) -1;
33726 raise_neg_overflow:
33727  PyErr_SetString(PyExc_OverflowError,
33728  "can't convert negative value to int");
33729  return (int) -1;
33730 }
33731 
33732 /* CIntFromPy */
33733 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
33734  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
33735  const int is_unsigned = neg_one > const_zero;
33736 #if PY_MAJOR_VERSION < 3
33737  if (likely(PyInt_Check(x))) {
33738  if (sizeof(long) < sizeof(long)) {
33739  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
33740  } else {
33741  long val = PyInt_AS_LONG(x);
33742  if (is_unsigned && unlikely(val < 0)) {
33743  goto raise_neg_overflow;
33744  }
33745  return (long) val;
33746  }
33747  } else
33748 #endif
33749  if (likely(PyLong_Check(x))) {
33750  if (is_unsigned) {
33751 #if CYTHON_USE_PYLONG_INTERNALS
33752  const digit* digits = ((PyLongObject*)x)->ob_digit;
33753  switch (Py_SIZE(x)) {
33754  case 0: return (long) 0;
33755  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
33756  case 2:
33757  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
33758  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
33759  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33760  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
33761  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
33762  }
33763  }
33764  break;
33765  case 3:
33766  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
33767  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
33768  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33769  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
33770  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
33771  }
33772  }
33773  break;
33774  case 4:
33775  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
33776  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
33777  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33778  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
33779  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
33780  }
33781  }
33782  break;
33783  }
33784 #endif
33785 #if CYTHON_COMPILING_IN_CPYTHON
33786  if (unlikely(Py_SIZE(x) < 0)) {
33787  goto raise_neg_overflow;
33788  }
33789 #else
33790  {
33791  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
33792  if (unlikely(result < 0))
33793  return (long) -1;
33794  if (unlikely(result == 1))
33795  goto raise_neg_overflow;
33796  }
33797 #endif
33798  if (sizeof(long) <= sizeof(unsigned long)) {
33799  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
33800 #ifdef HAVE_LONG_LONG
33801  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
33802  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
33803 #endif
33804  }
33805  } else {
33806 #if CYTHON_USE_PYLONG_INTERNALS
33807  const digit* digits = ((PyLongObject*)x)->ob_digit;
33808  switch (Py_SIZE(x)) {
33809  case 0: return (long) 0;
33810  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
33811  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
33812  case -2:
33813  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
33814  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
33815  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33816  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
33817  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
33818  }
33819  }
33820  break;
33821  case 2:
33822  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
33823  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
33824  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33825  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
33826  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
33827  }
33828  }
33829  break;
33830  case -3:
33831  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
33832  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
33833  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33834  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
33835  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
33836  }
33837  }
33838  break;
33839  case 3:
33840  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
33841  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
33842  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33843  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
33844  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
33845  }
33846  }
33847  break;
33848  case -4:
33849  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
33850  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
33851  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33852  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
33853  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
33854  }
33855  }
33856  break;
33857  case 4:
33858  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
33859  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
33860  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
33861  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
33862  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
33863  }
33864  }
33865  break;
33866  }
33867 #endif
33868  if (sizeof(long) <= sizeof(long)) {
33869  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
33870 #ifdef HAVE_LONG_LONG
33871  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
33872  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
33873 #endif
33874  }
33875  }
33876  {
33877 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
33878  PyErr_SetString(PyExc_RuntimeError,
33879  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
33880 #else
33881  long val;
33882  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
33883  #if PY_MAJOR_VERSION < 3
33884  if (likely(v) && !PyLong_Check(v)) {
33885  PyObject *tmp = v;
33886  v = PyNumber_Long(tmp);
33887  Py_DECREF(tmp);
33888  }
33889  #endif
33890  if (likely(v)) {
33891  int one = 1; int is_little = (int)*(unsigned char *)&one;
33892  unsigned char *bytes = (unsigned char *)&val;
33893  int ret = _PyLong_AsByteArray((PyLongObject *)v,
33894  bytes, sizeof(val),
33895  is_little, !is_unsigned);
33896  Py_DECREF(v);
33897  if (likely(!ret))
33898  return val;
33899  }
33900 #endif
33901  return (long) -1;
33902  }
33903  } else {
33904  long val;
33905  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
33906  if (!tmp) return (long) -1;
33907  val = __Pyx_PyInt_As_long(tmp);
33908  Py_DECREF(tmp);
33909  return val;
33910  }
33911 raise_overflow:
33912  PyErr_SetString(PyExc_OverflowError,
33913  "value too large to convert to long");
33914  return (long) -1;
33915 raise_neg_overflow:
33916  PyErr_SetString(PyExc_OverflowError,
33917  "can't convert negative value to long");
33918  return (long) -1;
33919 }
33920 
33921 /* FastTypeChecks */
33922 #if CYTHON_COMPILING_IN_CPYTHON
33923 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
33924  while (a) {
33925  a = a->tp_base;
33926  if (a == b)
33927  return 1;
33928  }
33929  return b == &PyBaseObject_Type;
33930 }
33931 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
33932  PyObject *mro;
33933  if (a == b) return 1;
33934  mro = a->tp_mro;
33935  if (likely(mro)) {
33936  Py_ssize_t i, n;
33937  n = PyTuple_GET_SIZE(mro);
33938  for (i = 0; i < n; i++) {
33939  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
33940  return 1;
33941  }
33942  return 0;
33943  }
33944  return __Pyx_InBases(a, b);
33945 }
33946 #if PY_MAJOR_VERSION == 2
33947 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
33948  PyObject *exception, *value, *tb;
33949  int res;
33950  __Pyx_PyThreadState_declare
33951  __Pyx_PyThreadState_assign
33952  __Pyx_ErrFetch(&exception, &value, &tb);
33953  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
33954  if (unlikely(res == -1)) {
33955  PyErr_WriteUnraisable(err);
33956  res = 0;
33957  }
33958  if (!res) {
33959  res = PyObject_IsSubclass(err, exc_type2);
33960  if (unlikely(res == -1)) {
33961  PyErr_WriteUnraisable(err);
33962  res = 0;
33963  }
33964  }
33965  __Pyx_ErrRestore(exception, value, tb);
33966  return res;
33967 }
33968 #else
33969 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
33970  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
33971  if (!res) {
33972  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
33973  }
33974  return res;
33975 }
33976 #endif
33977 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
33978  Py_ssize_t i, n;
33979  assert(PyExceptionClass_Check(exc_type));
33980  n = PyTuple_GET_SIZE(tuple);
33981 #if PY_MAJOR_VERSION >= 3
33982  for (i=0; i<n; i++) {
33983  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
33984  }
33985 #endif
33986  for (i=0; i<n; i++) {
33987  PyObject *t = PyTuple_GET_ITEM(tuple, i);
33988  #if PY_MAJOR_VERSION < 3
33989  if (likely(exc_type == t)) return 1;
33990  #endif
33991  if (likely(PyExceptionClass_Check(t))) {
33992  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
33993  } else {
33994  }
33995  }
33996  return 0;
33997 }
33998 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
33999  if (likely(err == exc_type)) return 1;
34000  if (likely(PyExceptionClass_Check(err))) {
34001  if (likely(PyExceptionClass_Check(exc_type))) {
34002  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
34003  } else if (likely(PyTuple_Check(exc_type))) {
34004  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
34005  } else {
34006  }
34007  }
34008  return PyErr_GivenExceptionMatches(err, exc_type);
34009 }
34010 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
34011  assert(PyExceptionClass_Check(exc_type1));
34012  assert(PyExceptionClass_Check(exc_type2));
34013  if (likely(err == exc_type1 || err == exc_type2)) return 1;
34014  if (likely(PyExceptionClass_Check(err))) {
34015  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
34016  }
34017  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
34018 }
34019 #endif
34020 
34021 /* CheckBinaryVersion */
34022 static int __Pyx_check_binary_version(void) {
34023  char ctversion[4], rtversion[4];
34024  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
34025  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
34026  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
34027  char message[200];
34028  PyOS_snprintf(message, sizeof(message),
34029  "compiletime version %s of module '%.100s' "
34030  "does not match runtime version %s",
34031  ctversion, __Pyx_MODULE_NAME, rtversion);
34032  return PyErr_WarnEx(NULL, message, 1);
34033  }
34034  return 0;
34035 }
34036 
34037 /* InitStrings */
34038 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
34039  while (t->p) {
34040  #if PY_MAJOR_VERSION < 3
34041  if (t->is_unicode) {
34042  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
34043  } else if (t->intern) {
34044  *t->p = PyString_InternFromString(t->s);
34045  } else {
34046  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
34047  }
34048  #else
34049  if (t->is_unicode | t->is_str) {
34050  if (t->intern) {
34051  *t->p = PyUnicode_InternFromString(t->s);
34052  } else if (t->encoding) {
34053  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
34054  } else {
34055  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
34056  }
34057  } else {
34058  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
34059  }
34060  #endif
34061  if (!*t->p)
34062  return -1;
34063  if (PyObject_Hash(*t->p) == -1)
34064  return -1;
34065  ++t;
34066  }
34067  return 0;
34068 }
34069 
34070 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
34071  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
34072 }
34073 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
34074  Py_ssize_t ignore;
34075  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
34076 }
34077 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
34078 #if !CYTHON_PEP393_ENABLED
34079 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
34080  char* defenc_c;
34081  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
34082  if (!defenc) return NULL;
34083  defenc_c = PyBytes_AS_STRING(defenc);
34084 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34085  {
34086  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
34087  char* c;
34088  for (c = defenc_c; c < end; c++) {
34089  if ((unsigned char) (*c) >= 128) {
34090  PyUnicode_AsASCIIString(o);
34091  return NULL;
34092  }
34093  }
34094  }
34095 #endif
34096  *length = PyBytes_GET_SIZE(defenc);
34097  return defenc_c;
34098 }
34099 #else
34100 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
34101  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
34102 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34103  if (likely(PyUnicode_IS_ASCII(o))) {
34104  *length = PyUnicode_GET_LENGTH(o);
34105  return PyUnicode_AsUTF8(o);
34106  } else {
34107  PyUnicode_AsASCIIString(o);
34108  return NULL;
34109  }
34110 #else
34111  return PyUnicode_AsUTF8AndSize(o, length);
34112 #endif
34113 }
34114 #endif
34115 #endif
34116 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
34117 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
34118  if (
34119 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
34120  __Pyx_sys_getdefaultencoding_not_ascii &&
34121 #endif
34122  PyUnicode_Check(o)) {
34123  return __Pyx_PyUnicode_AsStringAndSize(o, length);
34124  } else
34125 #endif
34126 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
34127  if (PyByteArray_Check(o)) {
34128  *length = PyByteArray_GET_SIZE(o);
34129  return PyByteArray_AS_STRING(o);
34130  } else
34131 #endif
34132  {
34133  char* result;
34134  int r = PyBytes_AsStringAndSize(o, &result, length);
34135  if (unlikely(r < 0)) {
34136  return NULL;
34137  } else {
34138  return result;
34139  }
34140  }
34141 }
34142 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
34143  int is_true = x == Py_True;
34144  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
34145  else return PyObject_IsTrue(x);
34146 }
34147 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
34148  int retval;
34149  if (unlikely(!x)) return -1;
34150  retval = __Pyx_PyObject_IsTrue(x);
34151  Py_DECREF(x);
34152  return retval;
34153 }
34154 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
34155 #if PY_MAJOR_VERSION >= 3
34156  if (PyLong_Check(result)) {
34157  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
34158  "__int__ returned non-int (type %.200s). "
34159  "The ability to return an instance of a strict subclass of int "
34160  "is deprecated, and may be removed in a future version of Python.",
34161  Py_TYPE(result)->tp_name)) {
34162  Py_DECREF(result);
34163  return NULL;
34164  }
34165  return result;
34166  }
34167 #endif
34168  PyErr_Format(PyExc_TypeError,
34169  "__%.4s__ returned non-%.4s (type %.200s)",
34170  type_name, type_name, Py_TYPE(result)->tp_name);
34171  Py_DECREF(result);
34172  return NULL;
34173 }
34174 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
34175 #if CYTHON_USE_TYPE_SLOTS
34176  PyNumberMethods *m;
34177 #endif
34178  const char *name = NULL;
34179  PyObject *res = NULL;
34180 #if PY_MAJOR_VERSION < 3
34181  if (likely(PyInt_Check(x) || PyLong_Check(x)))
34182 #else
34183  if (likely(PyLong_Check(x)))
34184 #endif
34185  return __Pyx_NewRef(x);
34186 #if CYTHON_USE_TYPE_SLOTS
34187  m = Py_TYPE(x)->tp_as_number;
34188  #if PY_MAJOR_VERSION < 3
34189  if (m && m->nb_int) {
34190  name = "int";
34191  res = m->nb_int(x);
34192  }
34193  else if (m && m->nb_long) {
34194  name = "long";
34195  res = m->nb_long(x);
34196  }
34197  #else
34198  if (likely(m && m->nb_int)) {
34199  name = "int";
34200  res = m->nb_int(x);
34201  }
34202  #endif
34203 #else
34204  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
34205  res = PyNumber_Int(x);
34206  }
34207 #endif
34208  if (likely(res)) {
34209 #if PY_MAJOR_VERSION < 3
34210  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
34211 #else
34212  if (unlikely(!PyLong_CheckExact(res))) {
34213 #endif
34214  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
34215  }
34216  }
34217  else if (!PyErr_Occurred()) {
34218  PyErr_SetString(PyExc_TypeError,
34219  "an integer is required");
34220  }
34221  return res;
34222 }
34223 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
34224  Py_ssize_t ival;
34225  PyObject *x;
34226 #if PY_MAJOR_VERSION < 3
34227  if (likely(PyInt_CheckExact(b))) {
34228  if (sizeof(Py_ssize_t) >= sizeof(long))
34229  return PyInt_AS_LONG(b);
34230  else
34231  return PyInt_AsSsize_t(b);
34232  }
34233 #endif
34234  if (likely(PyLong_CheckExact(b))) {
34235  #if CYTHON_USE_PYLONG_INTERNALS
34236  const digit* digits = ((PyLongObject*)b)->ob_digit;
34237  const Py_ssize_t size = Py_SIZE(b);
34238  if (likely(__Pyx_sst_abs(size) <= 1)) {
34239  ival = likely(size) ? digits[0] : 0;
34240  if (size == -1) ival = -ival;
34241  return ival;
34242  } else {
34243  switch (size) {
34244  case 2:
34245  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
34246  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34247  }
34248  break;
34249  case -2:
34250  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
34251  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34252  }
34253  break;
34254  case 3:
34255  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
34256  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34257  }
34258  break;
34259  case -3:
34260  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
34261  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34262  }
34263  break;
34264  case 4:
34265  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
34266  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34267  }
34268  break;
34269  case -4:
34270  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
34271  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
34272  }
34273  break;
34274  }
34275  }
34276  #endif
34277  return PyLong_AsSsize_t(b);
34278  }
34279  x = PyNumber_Index(b);
34280  if (!x) return -1;
34281  ival = PyInt_AsSsize_t(x);
34282  Py_DECREF(x);
34283  return ival;
34284 }
34285 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
34286  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
34287 }
34288 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
34289  return PyInt_FromSize_t(ival);
34290 }
34291 
34292 
34293 #endif /* Py_PYTHON_H */
f
Double f
Definition: Headers.h:64
proteus::cppADR_base
Definition: ADR.h:10
s
Double s
Definition: Headers.h:84
L
Double L
Definition: Headers.h:72
n
Int n
Definition: Headers.h:28
U
Double U
Definition: Headers.h:88
v
Double v
Definition: Headers.h:95
T
Double T
Definition: Headers.h:87
z
Double * z
Definition: Headers.h:49
u
Double u
Definition: Headers.h:89
ns
Int ns
Definition: Headers.h:30
c
Double c
Definition: Headers.h:54
ADR.h
proteus::newADR
cppADR_base * newADR(int nSpaceIn, int nQuadraturePoints_elementIn, int nDOF_mesh_trial_elementIn, int nDOF_trial_elementIn, int nDOF_test_elementIn, int nQuadraturePoints_elementBoundaryIn, int CompKernelFlag)
Definition: ADR.h:1379
r
Double r
Definition: Headers.h:83
pos
double pos(double a)
Definition: testFMMandFSW.cpp:8